Skip to content

Lychee Link Checker Configuration Improvements #1244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 16, 2025
Merged

Lychee Link Checker Configuration Improvements #1244

merged 10 commits into from
Jan 16, 2025

Conversation

krofax
Copy link
Collaborator

@krofax krofax commented Jan 13, 2025

Description

Overview

This PR improves the link checking system by configuring Lychee to provide cleaner, more focused output when detecting broken links in our documentation.

Changes Made

  • Updated output format to display only [404] errors, reducing noise from other error types
  • Configured base directory handling to work consistently across all contributor environments
  • Implemented relative path resolution for documentation assets
  • Removed source file display from error messages for cleaner output
  • Added comprehensive remapping rules for handling internal documentation links

Metrics before

🔍 1573 Total (in 1m 6s) ✅ 1344 OK 🚫 133 Errors 👻 79 Excluded ⏳ 17 Timeouts

Metrics now

🔍 1566 Total (in 27s) ✅ 1419 OK 🚫 0 Errors 👻 147 Excluded(This involves external hrefs linked in the docs)

Before

Error messages were verbose and included unnecessary file path context:

[./pages/builders/app-developers/transactions/troubleshooting.mdx]:
[ERROR] file:///builders/cex-wallet-developers/wallet-support%23base-fee.mdx | Cannot find file

After

Clean, focused output showing only broken links:

[404] /cex-wallet-developers/wallet-support

Configuration Details

  • Set verbose = "error" to focus on critical issues
  • Implemented relative path remapping for documentation assets
  • Configured base directory to work with repository root
  • Added exclusions for known external endpoints and binary files
  • Set up status code acceptance ranges to isolate 404 errors

Tests

Additional context

Metadata

Copy link

netlify bot commented Jan 13, 2025

Deploy Preview for docs-optimism ready!

Name Link
🔨 Latest commit 0072bce
🔍 Latest deploy log https://app.netlify.com/sites/docs-optimism/deploys/6787b6e26a0c4c0008f23451
😎 Deploy Preview https://deploy-preview-1244--docs-optimism.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@krofax krofax marked this pull request as ready for review January 14, 2025 15:50
@krofax krofax requested review from 0xmariniere and a team as code owners January 14, 2025 15:50
Copy link
Contributor

coderabbitai bot commented Jan 14, 2025

📝 Walkthrough

Walkthrough

This pull request encompasses significant updates to the lychee.toml configuration file and various documentation pages within the Optimism developer documentation. Key changes to lychee.toml include adjustments to verbosity levels, URL remapping, base URL settings, exclusions, acceptance of status codes, and the introduction of options for anchor checking and output format. Documentation updates primarily focus on correcting links and restructuring URLs across multiple files, including those related to chain operations, tools, identity, and transaction management. Notable modifications include the removal of specific marketplace entries, updates to oracle descriptions, and adjustments to header formatting in the glossary. The overall intent is to enhance documentation accuracy, consistency, and navigability.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Docs as Documentation
    participant Config as lychee.toml

    Dev->>Config: Update configuration
    Config-->>Docs: Modify link checking
    Dev->>Docs: Update links and references
    Docs-->>Dev: Improved documentation structure
Loading

Possibly related PRs

  • custom-gas-token #665: The changes in the main PR regarding the lychee.toml configuration file may relate to the custom-gas-token PR, as both involve configuration aspects relevant to the OP Stack, although they focus on different features.
  • Custom Gas Token docs fix #718: This PR updates the documentation for the custom gas token feature, which is directly related to the changes in the lychee.toml file that also involve gas token configurations.
  • Update custom-gas-token.mdx #735: This PR updates the custom-gas-token.mdx file, which is relevant to the changes in the main PR that affect configurations related to gas tokens.

Suggested labels

flag:merge-pending-release, tutorial

Suggested reviewers

  • bradleycamacho
  • sbvegan

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🧹 Nitpick comments (7)
pages/builders/tools/build/oracles.mdx (2)

72-72: Improve sentence structure and clarity

The sentence about QRNG could be more informative and better structured.

Consider this revision:

- API3's QRNG provides dApps with truly random numbers based on quantum mechanics at no charge. More details [here](https://api3.org/)
+ API3's Quantum Random Number Generator (QRNG) provides dApps with quantum mechanics-based random numbers at no cost. Learn more about API3's QRNG service at [api3.org](https://api3.org/).

121-121: Improve link text clarity

The link text includes redundant platform names and could be more concise.

Consider this revision:

- You can explore the full catalog of Pyth Price Feed IDs for [OP Mainnet and Sepolia (EVM Stable)](https://www.pyth.network/developers/price-feed-ids).
+ You can explore the [full catalog of Pyth Price Feed IDs](https://www.pyth.network/developers/price-feed-ids) for both networks.
pages/connect/resources/glossary.mdx (2)

314-319: Simplify wordy phrases throughout the document.

Multiple instances of "in order to" can be simplified to "to" without losing meaning.

Examples of recommended changes:

-communicates with the rollup node in order to retrieve
+communicates with the rollup node to retrieve

-that [validators](#validator) need in order to verify
+that [validators](#validator) need to verify

-inputs](#l2-derivation-inputs) from L1 in order to derive
+inputs](#l2-derivation-inputs) from L1 to derive

-becomes the new safe L2 head. In order to perform
+becomes the new safe L2 head. To perform

Also applies to: 362-362, 438-438, 499-499

🧰 Tools
🪛 LanguageTool

[style] ~314-~314: Consider a shorter alternative to avoid wordiness.
Context: ...tcher communicates with the rollup node in order to retrieve the channels. The channels are...

(IN_ORDER_TO_PREMIUM)


[style] ~319-~319: Consider a shorter alternative to avoid wordiness.
Context: ...tcher) to a data availability provider, in order to make channels available. These transact...

(IN_ORDER_TO_PREMIUM)


242-242: Improve wording in OP Mainnet definition.

Replace "Previously" with "Formerly" for stronger technical writing.

-Previously known as just "Optimism,"
+Formerly known as just "Optimism,"
🧰 Tools
🪛 LanguageTool

[style] ~242-~242: Consider using “formerly” to strengthen your wording.
Context: ...r 2 blockchain powered by the OP Stack. Previously known as just "Optimism,"OP Mainnet is ...

(PREVIOUSLY_FORMERLY)

lychee.toml (3)

2-7: Consider the debugging implications of hiding source files.

While hiding source files (no_show_source = true) helps achieve cleaner output, it might make debugging broken links more challenging. Consider adding documentation on how to temporarily enable source file display when needed for troubleshooting.


12-19: Consider additional edge cases in URL remapping.

The remapping rules are well-structured but consider:

  1. Adding more binary formats to the resource file pattern (e.g., .ico, .woff, .woff2)
  2. Ensuring anchor handling works correctly with case-sensitive anchors

Line range hint 30-42: Enhance exclusions organization and documentation.

Consider reorganizing the exclusions list by:

  1. Grouping similar URLs (e.g., all Optimism URLs together)
  2. Adding comments to explain why certain URLs are excluded
 exclude = [
+    # Optimism RPC endpoints
     'https://mainnet.optimism.io',
     'https://mainnet-sequencer.optimism.io',
     'https://sepolia.optimism.io',
     'https://sepolia-sequencer.optimism.io',
+    # Base RPC endpoints
     'https://mainnet.base.org',
     'https://sepolia.base.org',
+    # Archive services
     'https://archive.org',
     'https://web.archive.org',
+    # External services
     'https://optimism.easscan.org',
+    # Binary and media files
     '\.(pdf|zip|png|jpg|jpeg|gif|svg|json)$'
 ]
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2c03602 and c61aa87.

📒 Files selected for processing (18)
  • lychee.toml (2 hunks)
  • pages/builders/app-developers/transactions/parameters.mdx (1 hunks)
  • pages/builders/app-developers/transactions/troubleshooting.mdx (0 hunks)
  • pages/builders/chain-operators/features/custom-gas-token.mdx (1 hunks)
  • pages/builders/chain-operators/self-hosted.mdx (2 hunks)
  • pages/builders/chain-operators/tools/chain-monitoring.mdx (1 hunks)
  • pages/builders/chain-operators/tools/op-deployer.mdx (1 hunks)
  • pages/builders/tools/build/nft-tools.mdx (0 hunks)
  • pages/builders/tools/build/oracles.mdx (2 hunks)
  • pages/chain/identity/about-attestations.mdx (0 hunks)
  • pages/chain/identity/projects.mdx (1 hunks)
  • pages/chain/security/privileged-roles.mdx (1 hunks)
  • pages/connect/resources/glossary.mdx (7 hunks)
  • pages/stack/differences.mdx (1 hunks)
  • pages/stack/interop/assets/transfer-superchainERC20.mdx (2 hunks)
  • pages/stack/interop/message-passing.mdx (2 hunks)
  • pages/stack/rollup/outages.mdx (1 hunks)
  • pages/stack/transactions/fees.mdx (1 hunks)
💤 Files with no reviewable changes (3)
  • pages/builders/tools/build/nft-tools.mdx
  • pages/builders/app-developers/transactions/troubleshooting.mdx
  • pages/chain/identity/about-attestations.mdx
✅ Files skipped from review due to trivial changes (10)
  • pages/stack/rollup/outages.mdx
  • pages/stack/differences.mdx
  • pages/builders/chain-operators/features/custom-gas-token.mdx
  • pages/chain/security/privileged-roles.mdx
  • pages/builders/chain-operators/tools/op-deployer.mdx
  • pages/builders/app-developers/transactions/parameters.mdx
  • pages/stack/interop/assets/transfer-superchainERC20.mdx
  • pages/chain/identity/projects.mdx
  • pages/stack/interop/message-passing.mdx
  • pages/stack/transactions/fees.mdx
🧰 Additional context used
📓 Path-based instructions (4)
pages/builders/chain-operators/tools/chain-monitoring.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
pages/builders/chain-operators/self-hosted.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
pages/builders/tools/build/oracles.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
pages/connect/resources/glossary.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
🪛 LanguageTool
pages/builders/tools/build/oracles.mdx

[grammar] ~118-~118: Probable usage error. Use “and” after ‘both’.
Context: ...h the real-time spot price of the asset as well as an accompanying confidence interval ban...

(BOTH_AS_WELL_AS)

pages/connect/resources/glossary.mdx

[grammar] ~24-~24: Did you mean to use the possessive pronoun “its”?
Context: ...ts a deposit from L1 to L2, it's address (as returned by ORIGIN and `C...

(IT_S_ITS)


[uncategorized] ~71-~71: Possible missing preposition found.
Context: ...or promotion. ### Layer 1 (L1) Refers the Ethereum blockchain, used in contrast t...

(AI_HYDRA_LEO_MISSING_TO)


[style] ~130-~130: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative.
Context: ...ode) in validator mode. Doing so grants a lot of benefits similar to running an Ethereum...

(A_LOT_OF)


[style] ~167-~167: The phrase ‘have the ability to’ might be wordy. Consider using “can”.
Context: ...r decentralized system, and individuals have the ability to grant or revoke access to their data as...

(HAS_THE_ABILITY_TO)


[uncategorized] ~172-~172: Possible missing comma found.
Context: ... attestation service (EAS) An Ethereum infrastructure public good for making attestations on ...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~196-~196: Do not mix variants of the same word (‘attestor’ and ‘attester’) within a single text.
Context: ...res from a pre-agreed upon set of chain attestors. ### Cannon fault proof A fault proof...

(EN_WORD_COHERENCY)


[misspelling] ~225-~225: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...t maps keys to values. The root hash of a MPT is a commitment to the contents of ...

(EN_A_VS_AN)


[style] ~242-~242: Consider using “formerly” to strengthen your wording.
Context: ...r 2 blockchain powered by the OP Stack. Previously known as just "Optimism,"OP Mainnet is ...

(PREVIOUSLY_FORMERLY)


[uncategorized] ~268-~268: Possible missing comma found.
Context: ...Sequencer The specific entity or smart contract which has priority when submitting tran...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~293-~293: Possible missing comma found.
Context: .... ### Superchain Bridge The L1 bridge contracts which govern all OP Chains in the Super...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~314-~314: Consider a shorter alternative to avoid wordiness.
Context: ...tcher communicates with the rollup node in order to retrieve the channels. The channels are...

(IN_ORDER_TO_PREMIUM)


[style] ~319-~319: Consider a shorter alternative to avoid wordiness.
Context: ...tcher) to a data availability provider, in order to make channels available. These transact...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~360-~360: This adjective is normally spelled with a hyphen (British English) or as one word (American English).
Context: ...i.e. retrievable) during a reasonably long time window. In Optimism's case, the data in...

(TIME_HYPHEN)


[style] ~362-~362: Consider a shorter alternative to avoid wordiness.
Context: ...tch) that validators need in order to verify the sequencer's work and validat...

(IN_ORDER_TO_PREMIUM)


[style] ~438-~438: Consider a shorter alternative to avoid wordiness.
Context: ... inputs](#l2-derivation-inputs) from L1 in order to derive the L2 chain. ### L2 Chain Ince...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~460-~460: Possible missing comma found.
Context: ...output properties. ### Relayer EOA on L1 which finalizes a withdrawal by submitt...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~472-~472: Possible missing article found.
Context: ...ode) knows about. ### Sequencer Batch List of L2 transactions (that were submitted...

(AI_HYDRA_LEO_MISSING_A)


[style] ~499-~499: Consider a shorter alternative to avoid wordiness.
Context: ...l2-block) becomes the new safe L2 head. In order to perform consolidation, the node verifie...

(IN_ORDER_TO_PREMIUM)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Redirect rules - docs-optimism
  • GitHub Check: Header rules - docs-optimism
  • GitHub Check: Pages changed - docs-optimism
  • GitHub Check: pr-workflow
🔇 Additional comments (7)
pages/builders/chain-operators/self-hosted.mdx (2)

59-59: LGTM!

The link update is consistent with other changes and points to the correct documentation.


25-26: Verify navigation impact of removing fragment identifiers.

While removing fragment identifiers makes the links more maintainable, it might affect user navigation. Consider keeping specific section anchors to help users quickly find relevant content.

✅ Verification successful

Fragment identifiers can be safely removed

The target page has clear, prominent section headers for both Layer 1 and Layer 2 contracts, making it easy for users to locate relevant content even without specific anchors. The document's well-structured hierarchy ensures good navigation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify if the target pages have clear section headers for L1 and L2 contracts
# that users can easily find without fragment identifiers

# Check if the target page has clear section headers
rg -A 2 "^#+ .*contracts" "stack/smart-contracts.mdx"

Length of output: 119


Script:

#!/bin/bash
# Find the smart contracts documentation file
fd -e mdx -e md "smart-contracts"

# After finding the file, we'll check its content in the next iteration

Length of output: 123


Script:

#!/bin/bash
# Check headers in both files
echo "=== Checking pages/stack/smart-contracts.mdx ==="
rg -B 1 -A 2 "^#+ .*((L1|L2|[Ll]ayer|[Cc]ontract))" "pages/stack/smart-contracts.mdx"

echo -e "\n=== Checking pages/builders/chain-operators/deploy/smart-contracts.mdx ==="
rg -B 1 -A 2 "^#+ .*((L1|L2|[Ll]ayer|[Cc]ontract))" "pages/builders/chain-operators/deploy/smart-contracts.mdx"

Length of output: 3218

pages/builders/chain-operators/tools/chain-monitoring.mdx (1)

100-100: LGTM!

The link update maintains the specific section reference while following documentation standards.

lychee.toml (4)

22-23: LGTM! Base URL change improves flexibility.

Setting base = "." ensures consistent base directory handling across different environments, as mentioned in the PR objectives.


44-48: LGTM! Status code configuration aligns with objectives.

The configuration effectively focuses on 404 errors while accepting all other status codes, which matches the PR's goal of displaying only broken links.


51-52: LGTM! Compact format enhances readability.

Using compact format helps achieve the PR's goal of producing cleaner and more focused output.


54-56: Verify anchor checking compatibility with URL remapping.

While enabling anchor checking is beneficial, we should verify that it works correctly with the URL remapping rules, especially for URL-encoded anchors.

✅ Verification successful

Anchor checking is compatible with URL remapping rules

The configuration is correctly set up with explicit remapping rules to handle both URL-encoded (%23) and regular (#) anchors in MDX files.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if any files contain URL-encoded anchors that might conflict with the remapping rules

# Search for URL-encoded anchors in MDX files
rg -l '%23' --type mdx

# Search for regular anchors in MDX files for comparison
rg -l '#[^#]' --type mdx

Length of output: 105


Script:

#!/bin/bash
# Find documentation files
echo "=== Documentation files ==="
fd -e md -e markdown -e rst

# Check for URL remapping rules in lychee.toml
echo -e "\n=== URL remapping rules in lychee.toml ==="
cat lychee.toml | grep -A 5 "remap"

# Search for both URL-encoded and regular anchors
echo -e "\n=== Files with URL-encoded anchors (%23) ==="
rg -l '%23' 

echo -e "\n=== Files with regular anchors (#) ==="
rg -l '#[^#]' --type-add 'docs:*.{md,markdown,rst}'

Length of output: 11677

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
pages/connect/resources/glossary.mdx (2)

512-514: Enhance clarity of the Withdrawal transaction definition.

The current definition is ambiguous and could be improved by explicitly mentioning the direction and purpose.

-Sent from L2 to L1 that may transfer data and/or value; these "transactions" exist at multiple levels (see withdrawal initiating transaction and withdrawal finalizing transaction for details).
+A transaction initiated on L2 and finalized on L1 that enables the transfer of data and/or value between layers. These transactions are processed in two phases: initiation and finalization (see withdrawal initiating transaction and withdrawal finalizing transaction for details).

Line range hint 1-524: Consider style improvements for better readability.

The glossary is comprehensive and well-structured. Consider these style improvements:

  1. Replace "in order to" with "to" where appropriate for conciseness
  2. Replace "have the ability to" with "can" for simpler wording
  3. Consider using "formerly" instead of "previously" for stronger wording
🧰 Tools
🪛 LanguageTool

[style] ~438-~438: Consider a shorter alternative to avoid wordiness.
Context: ... inputs](#l2-derivation-inputs) from L1 in order to derive the L2 chain. ### L2 Chain Ince...

(IN_ORDER_TO_PREMIUM)


[style] ~499-~499: Consider a shorter alternative to avoid wordiness.
Context: ...l2-block) becomes the new safe L2 head. In order to perform consolidation, the node verifie...

(IN_ORDER_TO_PREMIUM)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c61aa87 and eea9d4d.

📒 Files selected for processing (1)
  • pages/connect/resources/glossary.mdx (7 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
pages/connect/resources/glossary.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
🪛 LanguageTool
pages/connect/resources/glossary.mdx

[grammar] ~24-~24: Did you mean to use the possessive pronoun “its”?
Context: ...ts a deposit from L1 to L2, it's address (as returned by ORIGIN and `C...

(IT_S_ITS)


[style] ~130-~130: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative.
Context: ...ode) in validator mode. Doing so grants a lot of benefits similar to running an Ethereum...

(A_LOT_OF)


[style] ~167-~167: The phrase ‘have the ability to’ might be wordy. Consider using “can”.
Context: ...r decentralized system, and individuals have the ability to grant or revoke access to their data as...

(HAS_THE_ABILITY_TO)


[uncategorized] ~196-~196: Do not mix variants of the same word (‘attestor’ and ‘attester’) within a single text.
Context: ...res from a pre-agreed upon set of chain attestors. ### Cannon fault proof A fault proof...

(EN_WORD_COHERENCY)


[misspelling] ~225-~225: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...t maps keys to values. The root hash of a MPT is a commitment to the contents of ...

(EN_A_VS_AN)


[style] ~242-~242: Consider using “formerly” to strengthen your wording.
Context: ...r 2 blockchain powered by the OP Stack. Previously known as just "Optimism,"OP Mainnet is ...

(PREVIOUSLY_FORMERLY)


[style] ~314-~314: Consider a shorter alternative to avoid wordiness.
Context: ...tcher communicates with the rollup node in order to retrieve the channels. The channels are...

(IN_ORDER_TO_PREMIUM)


[style] ~319-~319: Consider a shorter alternative to avoid wordiness.
Context: ...tcher) to a data availability provider, in order to make channels available. These transact...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~360-~360: This adjective is normally spelled with a hyphen (British English) or as one word (American English).
Context: ...i.e. retrievable) during a reasonably long time window. In Optimism's case, the data in...

(TIME_HYPHEN)


[style] ~362-~362: Consider a shorter alternative to avoid wordiness.
Context: ...tch) that validators need in order to verify the sequencer's work and validat...

(IN_ORDER_TO_PREMIUM)


[style] ~438-~438: Consider a shorter alternative to avoid wordiness.
Context: ... inputs](#l2-derivation-inputs) from L1 in order to derive the L2 chain. ### L2 Chain Ince...

(IN_ORDER_TO_PREMIUM)


[style] ~499-~499: Consider a shorter alternative to avoid wordiness.
Context: ...l2-block) becomes the new safe L2 head. In order to perform consolidation, the node verifie...

(IN_ORDER_TO_PREMIUM)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Redirect rules - docs-optimism
  • GitHub Check: Header rules - docs-optimism
  • GitHub Check: Pages changed - docs-optimism
  • GitHub Check: pr-workflow
🔇 Additional comments (5)
pages/connect/resources/glossary.mdx (5)

194-196: ⚠️ Potential issue

Maintain consistency in attestation-related terms.

The document uses both "attestors" and "attesters". Maintain consistency by using "attesters" throughout the document, as it's the more commonly used term.

-A proof which consists of some number of signatures from a pre-agreed upon set of chain attestors.
+A proof which consists of some number of signatures from a pre-agreed upon set of chain attesters.

Likely invalid or redundant comment.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~196-~196: Do not mix variants of the same word (‘attestor’ and ‘attester’) within a single text.
Context: ...res from a pre-agreed upon set of chain attestors. ### Cannon fault proof A fault proof...

(EN_WORD_COHERENCY)


222-225: ⚠️ Potential issue

Fix article usage before acronym MPT.

Use "an" instead of "a" before MPT as it starts with a vowel sound (em).

-The root hash of a MPT is a commitment to the contents of the tree,
+The root hash of an MPT is a commitment to the contents of the tree,

Likely invalid or redundant comment.

🧰 Tools
🪛 LanguageTool

[misspelling] ~225-~225: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...t maps keys to values. The root hash of a MPT is a commitment to the contents of ...

(EN_A_VS_AN)


471-473: ⚠️ Potential issue

Add missing article in Sequencer Batch definition.

The definition should start with an article for better readability and consistency with other definitions.

-List of L2 transactions (that were submitted to a sequencer) tagged with an [epoch
+A list of L2 transactions (that were submitted to a sequencer) tagged with an [epoch

Likely invalid or redundant comment.


27-30: ⚠️ Potential issue

Fix code formatting in the Block definition.

The word 'header' is incorrectly formatted with triple backticks instead of single backticks.

-A sequential list of transactions, along with a couple of properties stored in the '''header''' of the block;
+A sequential list of transactions, along with a couple of properties stored in the `header` of the block;

Likely invalid or redundant comment.


22-24: ⚠️ Potential issue

Fix grammar in the Address aliasing definition.

The definition contains a grammatical error in the use of "it's" which should be "its" as it's being used as a possessive pronoun.

-When a contract submits a [deposit](#deposit) from L1 to L2, it's address (as returned by `ORIGIN` and `CALLER`) will be
+When a contract submits a [deposit](#deposit) from L1 to L2, its address (as returned by `ORIGIN` and `CALLER`) will be

Likely invalid or redundant comment.

🧰 Tools
🪛 LanguageTool

[grammar] ~24-~24: Did you mean to use the possessive pronoun “its”?
Context: ...ts a deposit from L1 to L2, it's address (as returned by ORIGIN and `C...

(IT_S_ITS)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
lychee.toml (1)

Line range hint 30-42: Add comments to document RPC endpoint exclusions

Consider adding comments to explain why specific RPC endpoints are excluded from checking.

Apply this diff to improve documentation:

 # Exclude RPC URLs from checking
 exclude = [
+    # OP Mainnet RPC endpoints
     'https://mainnet.optimism.io',
     'https://mainnet-sequencer.optimism.io',
+    # OP Sepolia RPC endpoints
     'https://sepolia.optimism.io',
     'https://sepolia-sequencer.optimism.io',
+    # Archive services
     'https://archive.org',
     'https://web.archive.org',
+    # Base RPC endpoints
     'https://mainnet.base.org',
     'https://sepolia.base.org',
+    # EAS Scanner
     'https://optimism.easscan.org',
+    # Binary and media files
     '\.(pdf|zip|png|jpg|jpeg|gif|svg|json)$'
 ]
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eea9d4d and b59d359.

📒 Files selected for processing (4)
  • lychee.toml (2 hunks)
  • pages/builders/tools/build/oracles.mdx (2 hunks)
  • pages/chain/identity/schemas.mdx (1 hunks)
  • words.txt (0 hunks)
💤 Files with no reviewable changes (1)
  • words.txt
✅ Files skipped from review due to trivial changes (1)
  • pages/chain/identity/schemas.mdx
🧰 Additional context used
📓 Path-based instructions (1)
pages/builders/tools/build/oracles.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
  • For H1, H2, and H3 headers:
    1. Use sentence case, capitalizing only the first word.
    2. Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
    3. Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
  • Flag any headers that seem to inconsistently apply these rules for manual review.
  • When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
    "
🪛 LanguageTool
pages/builders/tools/build/oracles.mdx

[grammar] ~117-~117: Probable usage error. Use “and” after ‘both’.
Context: ...h the real-time spot price of the asset as well as an accompanying confidence interval ban...

(BOTH_AS_WELL_AS)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: pr-workflow
  • GitHub Check: Redirect rules - docs-optimism
  • GitHub Check: Header rules - docs-optimism
  • GitHub Check: Pages changed - docs-optimism
🔇 Additional comments (7)
lychee.toml (4)

12-23: LGTM! Well-structured URL remapping rules

The remapping rules effectively handle various file types and anchor scenarios while maintaining proper path resolution.


44-46: LGTM! Improved status code acceptance

The configuration now only accepts successful status codes (200-299), which addresses previous concerns about accepting potentially problematic status codes.


49-54: LGTM! Output format and anchor configuration

The compact format and anchor checking settings align well with the PR objectives for cleaner and more focused output.


6-7: ⚠️ Potential issue

Fix contradictory configuration for source file display

The setting no_show_source = false will show source files in the output, which contradicts the PR objective of removing source file displays from error messages.

Apply this diff to fix the configuration:

- no_show_source = false
+ no_show_source = true

Likely invalid or redundant comment.

pages/builders/tools/build/oracles.mdx (3)

120-120: LGTM! Updated Pyth Network links

The links have been correctly updated to point to the new documentation structure.


67-68: ⚠️ Potential issue

Fix link formatting issues

The following issues need attention:

  1. The OEV recapture link is empty
  2. The URL should use proper MDX link syntax

Apply this diff to fix the issues:

- The price feeds are delivered by an aggregate of [first-party oracles](https://docs.api3.org/oev-searchers/glossary.html#first-party-oracles) using signed data and support [OEV recapture]().
- [https://docs.api3.org/dapps/integration/security-considerations.html#oracle-extractable-value-oev](https://docs.api3.org/dapps/integration/security-considerations.html#oracle-extractable-value-oev)
+ The price feeds are delivered by an aggregate of [first-party oracles](https://docs.api3.org/oev-searchers/glossary.html#first-party-oracles) using signed data and support [OEV recapture](https://docs.api3.org/dapps/integration/security-considerations.html#oracle-extractable-value-oev).

Likely invalid or redundant comment.


117-117: ⚠️ Potential issue

Fix grammatical construction

The "both...as well as" construction is grammatically incorrect.

Apply this diff to fix the grammar:

- Pyth Price Feeds offer both the real-time spot price of the asset as well as an accompanying confidence interval band around that price
+ Pyth Price Feeds offer both the real-time spot price of the asset and an accompanying confidence interval band around that price

Likely invalid or redundant comment.

🧰 Tools
🪛 LanguageTool

[grammar] ~117-~117: Probable usage error. Use “and” after ‘both’.
Context: ...h the real-time spot price of the asset as well as an accompanying confidence interval ban...

(BOTH_AS_WELL_AS)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
lychee.toml (1)

41-41: Consider removing redundant binary file pattern

The pattern '\.(pdf|zip|png|jpg|jpeg|gif|svg|json)$' is redundant with the resource file handling in the remap rules. While this provides extra protection, it might cause confusion during maintenance.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b59d359 and 0072bce.

📒 Files selected for processing (1)
  • lychee.toml (2 hunks)
🔇 Additional comments (6)
lychee.toml (6)

12-19: Well-structured URL remapping rules

The remapping rules are logically ordered from most specific to least specific, properly handling various URL patterns including resource files, encoded anchors, and regular MDX files.


22-23: Base URL configuration aligns with objectives

Setting base = "." ensures consistent base directory handling by using the repository root, which aligns with the PR objectives.


44-48: Reconsider accepting certain error status codes

The current configuration accepts potentially problematic status codes (401 Unauthorized, 402 Payment Required, 403 Forbidden). These might mask real issues with the documentation links.

Consider excluding these status codes:

 accept = [
     "100..=399",
-    "401..=403",
     "405..=999"
 ]

51-52: Output format aligns with objectives

The compact format setting will help achieve the PR objective of producing cleaner and more focused output.


54-56: Good addition of anchor checking

Enabling anchor checking for local files will help identify broken internal document references, improving documentation quality.


6-7: ⚠️ Potential issue

Fix inconsistency with PR objectives

The current setting no_show_source = false will show source files in error messages, which contradicts the PR objective of "removing source file displays from error messages" for cleaner output.

Apply this change to hide source files:

-no_show_source = false
+no_show_source = true

Likely invalid or redundant comment.

@krofax krofax merged commit 0de34bd into main Jan 16, 2025
8 checks passed
@krofax krofax deleted the replace-lychee branch January 16, 2025 14:04
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.

3 participants