Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ reviews:
- "!node_modules/**"
- "!dist/**"
- "src/**"
- "zk-compression-docs/**"
- "LICENSE"

# Custom review instructions for specific paths
Expand Down
35 changes: 19 additions & 16 deletions zk-compression-docs/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ Maps documentation pages to source code and examples.

## Key Repositories

- **light-protocol**: https://github.com/Lightprotocol/light-protocol
- **photon**: https://github.com/helius-labs/photon
- **program-examples**: https://github.com/Lightprotocol/program-examples
- **light-protocol**: <https://github.com/Lightprotocol/light-protocol>
- **photon**: <https://github.com/helius-labs/photon>
- **program-examples**: <https://github.com/Lightprotocol/program-examples>

## Compressed Tokens

```
```text
Compressed Tokens
├── Overview (compressed-tokens/overview.md)
│ └── src: https://github.com/Lightprotocol/light-protocol/tree/main/js/compressed-token
Expand Down Expand Up @@ -88,7 +88,7 @@ Compressed Tokens

## Compressed PDAs

```
```text
Compressed PDAs
├── Create a Program with Compressed PDAs (compressed-pdas/create-a-program-with-compressed-pdas.md)
│ ├── src: https://github.com/Lightprotocol/light-protocol/tree/main/sdk-libs/sdk
Expand Down Expand Up @@ -150,7 +150,7 @@ Compressed PDAs

## Learn

```
```text
Learn
├── Core Concepts (learn/core-concepts/README.md)
│ ├── Compressed Account Model (compressed-account-model.md)
Expand Down Expand Up @@ -180,7 +180,7 @@ Learn

## Resources

```
```text
Resources
├── CLI Installation (cli-installation.md)
│ ├── CLI source: https://github.com/Lightprotocol/light-protocol/tree/main/cli
Expand Down Expand Up @@ -274,12 +274,15 @@ Resources

## References

├── Whitepaper (references/whitepaper.md)
│ └── PDF: https://github.com/Lightprotocol/light-protocol/blob/main/light_paper_v0.1.0.pdf
├── Node Operators (references/node-operators.md)
│ ├── Photon indexer: https://github.com/helius-labs/photon
│ ├── Prover: https://github.com/Lightprotocol/light-protocol/tree/main/light-prover
│ └── Forester: https://github.com/Lightprotocol/light-protocol/tree/main/forester
├── Terminology (references/terminology.md)
└── Security (references/security.md)
└── audits: https://github.com/Lightprotocol/light-protocol/tree/main/audits
```text
References
├── Whitepaper (references/whitepaper.md)
│ └── PDF: <https://github.com/Lightprotocol/light-protocol/blob/main/light_paper_v0.1.0.pdf>
├── Node Operators (references/node-operators.md)
│ ├── Photon indexer: <https://github.com/helius-labs/photon>
│ ├── Prover: <https://github.com/Lightprotocol/light-protocol/tree/main/light-prover>
│ └── Forester: <https://github.com/Lightprotocol/light-protocol/tree/main/forester>
├── Terminology (references/terminology.md)
└── Security (references/security.md)
└── audits: <https://github.com/Lightprotocol/light-protocol/tree/main/audits>
```
Comment on lines +277 to +288
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify URL accessibility and add trailing newline.

The References section correctly uses angle-bracket formatting for URLs within the text code block. However, the file is missing a trailing newline at the end (flagged by MD047).

Apply this diff to add the trailing newline:

      └── audits: <https://github.com/Lightprotocol/light-protocol/tree/main/audits>
+

Additionally, run the verification script below to validate that all GitHub URLs point to existing files/directories in the referenced repositories:


🏁 Script executed:

#!/bin/bash
# Description: Verify all GitHub URLs in CLAUDE.md are valid and accessible
# Validates URLs against GitHub's API to ensure files/directories exist

set -e

file_path="zk-compression-docs/CLAUDE.md"
temp_file=$(mktemp)

# Extract all GitHub URLs from the file (handles both plain and angle-bracket formats)
grep -oP 'https://github\.com/[^>\s)]+' "$file_path" | sort -u > "$temp_file"

echo "Extracted $(wc -l < "$temp_file") unique GitHub URLs"
echo ""

failed=0
while IFS= read -r url; do
  # Convert raw GitHub URLs to API endpoints for validation
  # Example: https://github.com/Lightprotocol/light-protocol/tree/main/sdk → 
  #          https://api.github.com/repos/Lightprotocol/light-protocol/contents/sdk
  
  api_url=$(echo "$url" | sed -E 's|https://github\.com/([^/]+)/([^/]+)(/tree/[^/]+)?(.*)|\1/\2\4|' | \
    sed 's|^|https://api.github.com/repos/|' | \
    sed 's|blob/||')
  
  # Test URL accessibility with GitHub API
  http_code=$(curl -s -o /dev/null -w "%{http_code}" -H "Accept: application/vnd.github.v3+json" "$api_url" || echo "000")
  
  if [[ "$http_code" != "200" && "$http_code" != "404" ]]; then
    echo "⚠️  URL check inconclusive (HTTP $http_code): $url"
  elif [[ "$http_code" == "404" ]]; then
    echo "❌ BROKEN: $url"
    ((failed++))
  else
    echo "$url"
  fi
done < "$temp_file"

rm "$temp_file"

if [ $failed -gt 0 ]; then
  echo ""
  echo "Found $failed broken or inaccessible URLs. Please verify and update."
  exit 1
fi

Length of output: 94


I need to locate the CLAUDE.md file first. Let me search for it in the repository.

Let me search for the actual repository structure to locate the file.


🏁 Script executed:

#!/bin/bash
# Find CLAUDE.md files in the repository
find . -name "CLAUDE.md" -type f 2>/dev/null || echo "No CLAUDE.md found"
echo "---"
# List directory structure to understand layout
if [ -d "zk-compression-docs" ]; then
  echo "zk-compression-docs exists"
  ls -la zk-compression-docs/ 2>/dev/null | head -20
else
  echo "zk-compression-docs directory not found"
  ls -la | head -20
fi

Length of output: 998


Now let me examine the file content at the specified lines and check for the trailing newline issue:


🏁 Script executed:

#!/bin/bash
# Check lines 277-288 in CLAUDE.md
echo "=== Lines 277-288 ==="
sed -n '277,288p' ./zk-compression-docs/CLAUDE.md

echo ""
echo "=== Last 5 lines ==="
tail -5 ./zk-compression-docs/CLAUDE.md | cat -A

echo ""
echo "=== File ends with newline? ==="
if [ -z "$(tail -c 1 ./zk-compression-docs/CLAUDE.md)" ]; then
  echo "✅ File ends with newline"
else
  echo "❌ File does NOT end with newline (missing trailing newline)"
fi

Length of output: 1166


Perfect! Now let me verify the GitHub URLs with the correct path:


🏁 Script executed:

#!/bin/bash
# Description: Verify all GitHub URLs in CLAUDE.md are valid and accessible
# Validates URLs against GitHub's API to ensure files/directories exist

file_path="./zk-compression-docs/CLAUDE.md"
temp_file=$(mktemp)

# Extract all GitHub URLs from the file (handles both plain and angle-bracket formats)
grep -oP 'https://github\.com/[^>\s)]+' "$file_path" | sort -u > "$temp_file"

echo "Extracted $(wc -l < "$temp_file") unique GitHub URLs"
echo ""

failed=0
while IFS= read -r url; do
  # Convert raw GitHub URLs to API endpoints for validation
  # Example: https://github.com/Lightprotocol/light-protocol/tree/main/sdk → 
  #          https://api.github.com/repos/Lightprotocol/light-protocol/contents/sdk
  
  api_url=$(echo "$url" | sed -E 's|https://github\.com/([^/]+)/([^/]+)(/tree/[^/]+)?(/blob/[^/]+)?(.*)|\1/\2\5|' | \
    sed 's|^|https://api.github.com/repos/|')
  
  # Test URL accessibility with GitHub API
  http_code=$(curl -s -o /dev/null -w "%{http_code}" -H "Accept: application/vnd.github.v3+json" "$api_url" 2>/dev/null || echo "000")
  
  if [[ "$http_code" == "200" ]]; then
    echo "$url"
  elif [[ "$http_code" == "404" ]]; then
    echo "❌ BROKEN: $url (HTTP 404)"
    ((failed++))
  else
    echo "⚠️  URL check inconclusive (HTTP $http_code): $url"
  fi
done < "$temp_file"

rm "$temp_file"

if [ $failed -gt 0 ]; then
  echo ""
  echo "Found $failed broken or inaccessible URLs."
  exit 1
fi

Length of output: 96


Add trailing newline to CLAUDE.md (lines 277–288 block).

The References section at lines 277–288 is correctly formatted and contains valid GitHub URLs in proper angle-bracket notation. However, the file is missing a trailing newline at the end, which violates the MD047 linting rule.

Apply this diff:

      └── audits: <https://github.com/Lightprotocol/light-protocol/tree/main/audits>
+

The GitHub URLs in this section—whitepaper, Photon indexer, Prover, Forester, and audits—are all in standard format pointing to the light-protocol and helius-labs repositories. They should be validated manually or via GitHub's web interface to ensure the referenced directories and files exist in the target repositories at the specified paths.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```text
References
├── Whitepaper (references/whitepaper.md)
│ └── PDF: <https://github.com/Lightprotocol/light-protocol/blob/main/light_paper_v0.1.0.pdf>
├── Node Operators (references/node-operators.md)
│ ├── Photon indexer: <https://github.com/helius-labs/photon>
│ ├── Prover: <https://github.com/Lightprotocol/light-protocol/tree/main/light-prover>
│ └── Forester: <https://github.com/Lightprotocol/light-protocol/tree/main/forester>
├── Terminology (references/terminology.md)
└── Security (references/security.md)
└── audits: <https://github.com/Lightprotocol/light-protocol/tree/main/audits>
```
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

288-288: Files should end with a single newline character

(MD047, single-trailing-newline)

🤖 Prompt for AI Agents
In zk-compression-docs/CLAUDE.md around lines 277 to 288, the References block
is correct but the file is missing a trailing newline at EOF (violates MD047);
fix by adding a single newline character at the end of the file so the file ends
with a blank line, then save/commit the change.