Skip to content
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
be46594
fix
udhaykumarbala Sep 23, 2025
9bb7b89
Merge branch '0gfoundation:main' into main
udhaykumarbala Sep 23, 2025
d85755a
Merge branch '0gfoundation:main' into main
udhaykumarbala Sep 24, 2025
29f28f5
Merge branch '0gfoundation:main' into main
udhaykumarbala Sep 30, 2025
e78db5f
Merge branch '0gfoundation:main' into main
udhaykumarbala Oct 7, 2025
b2be9ad
Merge branch '0gfoundation:main' into main
udhaykumarbala Oct 9, 2025
03cb5bc
Merge branch '0gfoundation:main' into main
udhaykumarbala Oct 11, 2025
c29d60a
Merge branch '0gfoundation:main' into main
udhaykumarbala Oct 13, 2025
0cbea16
Merge branch '0gfoundation:main' into main
udhaykumarbala Oct 16, 2025
b956125
Merge branch '0gfoundation:main' into main
udhaykumarbala Oct 16, 2025
84c5399
Merge branch '0gfoundation:main' into main
udhaykumarbala Oct 21, 2025
dc5c9ea
Merge branch '0gfoundation:main' into main
udhaykumarbala Oct 21, 2025
5939e4c
Merge branch '0gfoundation:main' into main
udhaykumarbala Oct 27, 2025
f45fe29
Merge branch '0gfoundation:main' into main
udhaykumarbala Nov 10, 2025
94ac4ad
Merge branch '0gfoundation:main' into main
udhaykumarbala Nov 19, 2025
29e60e8
Merge branch '0gfoundation:main' into main
udhaykumarbala Nov 28, 2025
b1671f5
Merge branch '0gfoundation:main' into main
udhaykumarbala Dec 4, 2025
1d39ded
Merge branch '0gfoundation:main' into main
udhaykumarbala Dec 8, 2025
2c5cfc7
Merge branch '0gfoundation:main' into main
udhaykumarbala Dec 8, 2025
3398bf9
Merge branch '0gfoundation:main' into main
udhaykumarbala Dec 16, 2025
0ee810e
Merge branch '0gfoundation:main' into main
udhaykumarbala Dec 16, 2025
b4f7df9
Merge branch '0gfoundation:main' into main
udhaykumarbala Dec 18, 2025
3730ccb
Merge branch '0gfoundation:main' into main
udhaykumarbala Jan 10, 2026
b30984a
token price update
udhaykumarbala Jan 10, 2026
bd3006f
Revert "token price update"
udhaykumarbala Jan 10, 2026
56672ad
Merge branch '0gfoundation:main' into main
udhaykumarbala Feb 5, 2026
c3108e6
Merge branch '0gfoundation:main' into main
udhaykumarbala Feb 5, 2026
9d41244
Merge branch '0gfoundation:main' into main
udhaykumarbala Feb 18, 2026
6356b04
Merge branch '0gfoundation:main' into main
udhaykumarbala Feb 18, 2026
e401b0d
Merge branch '0gfoundation:main' into main
udhaykumarbala Feb 19, 2026
1d29af7
Merge branch '0gfoundation:main' into main
udhaykumarbala Mar 9, 2026
56973fb
Merge branch '0gfoundation:main' into main
udhaykumarbala Mar 10, 2026
8573c60
Merge branch '0gfoundation:main' into main
udhaykumarbala Mar 12, 2026
ae45607
Merge branch '0gfoundation:main' into main
udhaykumarbala Mar 17, 2026
6b428d8
Merge branch '0gfoundation:main' into main
udhaykumarbala Mar 17, 2026
71a12ee
fix: resolve workflow CI failures — shell quoting and missing labels
udhaykumarbala Mar 17, 2026
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
159 changes: 78 additions & 81 deletions .github/workflows/ai-context-review.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Weekly AI Context Review
name: AI Context Review

on:
schedule:
# Every 3 days at 09:00 UTC (Mon, Thu, Sun)
# Every 3 days at 09:00 UTC
- cron: '0 9 */3 * *'
workflow_dispatch: # Allow manual trigger

Expand All @@ -20,72 +20,67 @@ jobs:
uses: actions/checkout@v4

- name: Check SDK versions and endpoints
id: check
env:
GH_TOKEN: ${{ github.token }}
run: |
NL=$'\n'
REPORT=""
HAS_UPDATES=false

# ── npm packages ──────────────────────────────────────
# ── helpers ─────────────────────────────────────────────
add() { REPORT="${REPORT}${1}${NL}"; }

check_npm() {
local pkg="$1"
local label="$2"
local pkg="$1" label="$2"
local version
version=$(npm view "$pkg" version 2>/dev/null || echo "NOT_FOUND")
echo "$label: $version"
REPORT="${REPORT}| ${label} | \`${pkg}\` | \`${version}\` |"$'\n'
add "| ${label} | \`${pkg}\` | \`${version}\` |"
}

REPORT="${REPORT}### npm Packages"$'\n\n'
REPORT="${REPORT}| SDK | Package | Latest Version |"$'\n'
REPORT="${REPORT}|-----|---------|----------------|"$'\n'

check_npm "@0gfoundation/0g-ts-sdk" "TypeScript Storage SDK"
check_npm "@0glabs/0g-serving-broker" "Compute CLI"

REPORT="${REPORT}"$'\n'

# ── GitHub releases ───────────────────────────────────
check_gh_release() {
local repo="$1"
local label="$2"
local repo="$1" label="$2"
local tag
tag=$(gh api "repos/${repo}/releases/latest" --jq '.tag_name' 2>/dev/null || echo "NONE")
if [ "$tag" = "NONE" ]; then
# Fallback: check tags if no formal release
tag=$(gh api "repos/${repo}/tags?per_page=1" --jq '.[0].name' 2>/dev/null || echo "NOT_FOUND")
fi
echo "$label: $tag"
REPORT="${REPORT}| ${label} | [${repo}](https://github.com/${repo}) | \`${tag}\` |"$'\n'
add "| ${label} | [${repo}](https://github.com/${repo}) | \`${tag}\` |"
}

REPORT="${REPORT}### GitHub Releases / Tags"$'\n\n'
REPORT="${REPORT}| Component | Repository | Latest Tag |"$'\n'
REPORT="${REPORT}|-----------|------------|------------|"$'\n'

check_gh_release "0gfoundation/0g-storage-client" "Go Storage Client/CLI"

REPORT="${REPORT}"$'\n'

# ── Endpoint health checks ───────────────────────────
check_endpoint() {
local url="$1"
local label="$2"
local url="$1" label="$2"
local status
status=$(curl -s -o /dev/null -w "%{http_code}" --max-time 10 "$url" 2>/dev/null || echo "TIMEOUT")
local icon="✅"
if [ "$status" != "200" ] && [ "$status" != "301" ] && [ "$status" != "302" ]; then
icon="❌"
HAS_UPDATES=true
fi
REPORT="${REPORT}| ${icon} | ${label} | \`${url}\` | ${status} |"$'\n'
add "| ${icon} | ${label} | \`${url}\` | ${status} |"
}

REPORT="${REPORT}### Endpoint Health"$'\n\n'
REPORT="${REPORT}| Status | Label | URL | HTTP Code |"$'\n'
REPORT="${REPORT}|--------|-------|-----|-----------|"$'\n'
# ── npm packages ────────────────────────────────────────
add "### npm Packages"
add ""
add "| SDK | Package | Latest Version |"
add "|-----|---------|----------------|"
check_npm "@0gfoundation/0g-ts-sdk" "TypeScript Storage SDK"
check_npm "@0glabs/0g-serving-broker" "Compute CLI"
add ""

# ── GitHub releases ─────────────────────────────────────
add "### GitHub Releases / Tags"
add ""
add "| Component | Repository | Latest Tag |"
add "|-----------|------------|------------|"
check_gh_release "0gfoundation/0g-storage-client" "Go Storage Client/CLI"
add ""

# ── Endpoint health ─────────────────────────────────────
add "### Endpoint Health"
add ""
add "| Status | Label | URL | HTTP Code |"
add "|--------|-------|-----|-----------|"
check_endpoint "https://evmrpc-testnet.0g.ai" "Testnet RPC"
check_endpoint "https://evmrpc.0g.ai" "Mainnet RPC"
check_endpoint "https://indexer-storage-testnet-turbo.0g.ai" "Testnet Storage Indexer"
Expand All @@ -95,71 +90,73 @@ jobs:
check_endpoint "https://storagescan-galileo.0g.ai" "Testnet Storage Explorer"
check_endpoint "https://faucet.0g.ai" "Faucet"
check_endpoint "https://cloud.google.com/application/web3/faucet/0g/galileo" "Google Cloud Faucet"
add ""

# ── Contract addresses ──────────────────────────────────
add "### Contract Addresses (from ai-context.md)"
add ""
add "Verify these against the latest deployment:"
add ""
if [ -f docs/ai-context.md ]; then
add "**Testnet:**"
TESTNET=$(grep -E '^\| \*\*(Flow|Mine|Reward|DAEntrance)\*\*' docs/ai-context.md | head -4)
add "$TESTNET"
add ""
add "**Mainnet:**"
MAINNET=$(grep -E '^\| \*\*(Flow|Mine|Reward)\*\*' docs/ai-context.md | tail -3)
add "$MAINNET"
else
add "⚠️ \`docs/ai-context.md\` not found in this branch."
fi
add ""

REPORT="${REPORT}"$'\n'

# ── Contract addresses diff ───────────────────────────
REPORT="${REPORT}### Contract Addresses (from ai-context.md)"$'\n\n'
REPORT="${REPORT}Verify these against the latest deployment:"$'\n\n'
REPORT="${REPORT}**Testnet:**"$'\n'
REPORT="${REPORT}$(grep -E '^\| \*\*(Flow|Mine|Reward|DAEntrance)\*\*' docs/ai-context.md | head -4)"$'\n\n'
REPORT="${REPORT}**Mainnet:**"$'\n'
REPORT="${REPORT}$(grep -E '^\| \*\*(Flow|Mine|Reward)\*\*' docs/ai-context.md | tail -3)"$'\n\n'

# ── TS SDK README diff check ──────────────────────────
REPORT="${REPORT}### SDK README Changes"$'\n\n'

# ── SDK README keyword scan ─────────────────────────────
add "### SDK README Changes"
add ""
TS_README=$(curl -sL "https://raw.githubusercontent.com/0gfoundation/0g-ts-sdk/main/README.md" 2>/dev/null)
if echo "$TS_README" | grep -qi "breaking\|migration\|deprecated\|removed"; then
REPORT="${REPORT}⚠️ **TypeScript SDK README** may contain breaking changes or deprecation notices — review manually."$'\n'
HAS_UPDATES=true
if echo "$TS_README" | grep -qi "breaking\|migration\|deprecated"; then
add "⚠️ **TypeScript SDK README** may contain breaking changes or deprecation notices — review manually."
else
REPORT="${REPORT}✅ TypeScript SDK README — no breaking change keywords detected."$'\n'
add "✅ TypeScript SDK README — no breaking change keywords detected."
fi

GO_README=$(curl -sL "https://raw.githubusercontent.com/0gfoundation/0g-storage-client/main/README.md" 2>/dev/null)
if echo "$GO_README" | grep -qi "breaking\|migration\|deprecated\|removed"; then
REPORT="${REPORT}⚠️ **Go SDK README** may contain breaking changes or deprecation notices — review manually."$'\n'
HAS_UPDATES=true
if echo "$GO_README" | grep -qi "breaking\|migration\|deprecated"; then
add "⚠️ **Go SDK README** may contain breaking changes or deprecation notices — review manually."
else
REPORT="${REPORT}✅ Go SDK README — no breaking change keywords detected."$'\n'
add "✅ Go SDK README — no breaking change keywords detected."
fi

REPORT="${REPORT}"$'\n'

# ── Save outputs ──────────────────────────────────────
echo "has_updates=$HAS_UPDATES" >> "$GITHUB_OUTPUT"

# Write report to file (multi-line safe)
cat > /tmp/report.md << 'HEADER'
## Weekly AI Context Page Review

Automated review of SDK versions, endpoints, and contract addresses referenced in `docs/ai-context.md`.

HEADER
echo "$REPORT" >> /tmp/report.md
echo "" >> /tmp/report.md
echo "---" >> /tmp/report.md
echo "*Review `docs/ai-context.md` and update any stale information. Close this issue when done.*" >> /tmp/report.md
# ── Write report file ───────────────────────────────────
{
echo "## AI Context Page Review"
echo ""
echo "Automated review of SDK versions, endpoints, and contract addresses referenced in \`docs/ai-context.md\`."
echo ""
echo "$REPORT"
echo "---"
echo "*Review \`docs/ai-context.md\` and update any stale information. Close this issue when done.*"
} > /tmp/report.md

- name: Create or update issue
env:
GH_TOKEN: ${{ github.token }}
run: |
TITLE="[Automated] Weekly AI Context Page Review — $(date +%Y-%m-%d)"
BODY=$(cat /tmp/report.md)
# Ensure labels exist
gh label create "ai-context-review" --description "Automated AI context page review" --color "0E8A16" 2>/dev/null || true
gh label create "documentation" --color "0075ca" 2>/dev/null || true

# Close previous auto-review issues
# Close previous review issues
gh issue list \
--label "ai-context-review" \
--state open \
--json number \
--jq '.[].number' | while read -r num; do
gh issue close "$num" --comment "Superseded by new weekly review."
gh issue close "$num" --comment "Superseded by new review." 2>/dev/null || true
done

# Create new issue
gh issue create \
--title "$TITLE" \
--body "$BODY" \
--title "[Automated] AI Context Review — $(date +%Y-%m-%d)" \
--body-file /tmp/report.md \
--label "ai-context-review,documentation"
Loading