Conversation
…ovements - Restructure docs into Overview, Python SDK, GenVM Specification, GenVM Internals - Add GenLayer branding: logo (black/white), favicon (dark mode aware), Switzer font - Version switcher: sort by semver descending, mark latest as preferred - Runners page: tiered (contract/optional/internal), usage examples, collapsible history - Changelog: unified API changes + runner version diffs, auto-generated from git history - Add social links (GitHub, Discord, Telegram, X) and llms.txt for LLM discovery - Local dev: fetch remote versions.json, merge with local build, sort client-side - Mobile: hide version switcher from navbar, show in sidebar instead - Remove "Show Source" link, clean up footer to just copyright
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 5 minutes and 10 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR comprehensively restructures the documentation infrastructure for the GenVM SDK. It updates the CI/CD version-sorting logic, introduces custom styling and theme management, expands Sphinx configuration to fetch and merge remote versions, reorganizes the documentation structure around an overview section, and significantly enhances the build script to generate release changelogs and runner specifications. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~70 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (2)
doc/website/src/conf.py (1)
41-64: Consider moving imports to file top and adding logging for fetch failures.The inline imports on line 42 work but are unconventional. For better maintainability, move
reandurllib.requestto the top of the file.The silent exception handling (line 48-49) makes debugging build issues harder. Consider adding a warning when the remote fetch fails.
♻️ Proposed improvements
At file top:
import os import json +import re +import urllib.request +import warnings from pathlib import PathThen update the fetch logic:
-import re as _re, urllib.request _switcher_url = '/_static/versions.json' try: _req = urllib.request.Request(f'https://{_docs_domain}/versions.json', headers={'User-Agent': 'sphinx-build'}) with urllib.request.urlopen(_req, timeout=5) as _resp: _remote_versions = json.loads(_resp.read()) except Exception: + warnings.warn(f'Could not fetch remote versions.json from {_docs_domain}, using empty list') _remote_versions = [] # ... def _semver_sort_key(entry): - m = _re.match(r'^v?(\d+)\.(\d+)\.(\d+)', entry.get('version', '')) + m = re.match(r'^v?(\d+)\.(\d+)\.(\d+)', entry.get('version', ''))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@doc/website/src/conf.py` around lines 41 - 64, Move the inline imports "import re as _re" and "urllib.request" to the top-level imports of conf.py and use the module-level logger (e.g., logging.getLogger(__name__)) to log failures; in the try/except that populates _remote_versions, catch Exception as e and call logger.warning (or logger.exception) with a clear message that includes the exception details so fetch failures are visible, leaving the existing fallback to set _remote_versions = []; ensure references like _semver_sort_key, _remote_versions, and the final Path(...).write_text remain unchanged.doc/website/src/python-sdk/changelog/v0.1.3.rst (1)
1-116: Content duplication withchangelog-notes/v0.1.3.rst.This file's content (lines 4-116) is nearly identical to
doc/website/src/python-sdk/changelog-notes/v0.1.3.rst. Consider using RST's.. include::directive to reference the shared content from one canonical location, reducing maintenance burden.Changelog v0.1.3 ================ .. include:: ../changelog-notes/v0.1.3.rst🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@doc/website/src/python-sdk/changelog/v0.1.3.rst` around lines 1 - 116, The doc "Changelog v0.1.3" duplicates the content from the canonical notes file; remove the duplicated body in this changelog and replace it with an RST include directive that pulls in the shared content from changelog-notes/v0.1.3.rst (keep the "Changelog v0.1.3" title in this file), ensure the include path is correct relative to this document and that any headings or directives still render as before, and delete the duplicated sections currently present between the title and the end of the file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/incl_docs.yml:
- Around line 83-93: The jq pipeline that merges $newEntry into
$existing_versions never clears existing preferred flags, causing multiple
versions to remain preferred; update the pipeline (around the
map/select(.version != $newEntry.version) + [$newEntry] step) to explicitly
reset preferred for all entries (e.g. apply map(. + {"preferred": false}) after
adding $newEntry and before computing _is_main/sorting) so that only the
subsequently assigned latest entry receives preferred: true and all prior
preferred flags are cleared; reference the variables/expressions
existing_versions, $newEntry, and the sort_by / _is_main logic when making the
change.
In `@doc/website/src/_static/custom.css`:
- Around line 107-112: Remove the ineffective CSS rule that tries to set a
favicon via the content property inside the `@media` (prefers-color-scheme: dark)
block (the selector link[rel="icon"] and its content: url('favicon-dark.png')
declaration), since the content property does not apply to link elements;
instead delete that entire `@media` rule and rely on the existing favicon-swap.js
referenced in conf.py to perform dark-mode favicon switching.
In `@doc/website/src/conf.py`:
- Around line 10-14: Move the stray import datetime to the top of
doc/website/src/conf.py alongside the other imports (so the import appears
before module-level assignments like project and author), then run the formatter
(ruff format doc/website/src/conf.py) to fix the CI formatting errors; ensure
the import datetime statement is removed from its current location and only
present at the top of the file so variables like project, copyright, author, and
release remain properly formatted.
In `@doc/website/src/python-sdk/reference/genlayer.rst`:
- Line 22: Fix the grammar in the sentence describing integer aliases: change
“It also have aliases...” to “It also has aliases...”, and adjust the phrase to
read smoothly—e.g. ensure the sentence reads like “It also has aliases for
signed and unsigned integer types (such as :py:obj:`~genlayer.py.types.u256`)
and a :py:obj:`~genlayer.py.types.bigint` alias that can be used in storage
unlike regular :py:class:`int`”; update the text that contains
:py:obj:`~genlayer.py.types.u256` and :py:obj:`~genlayer.py.types.bigint`.
In `@runners/support/match-tags.py`:
- Around line 140-146: The code only records the first hash (hashes[0] /
old_hashes[0]) when populating changes, which loses multi-hash runner history;
update the change assignments in the loop that iterates over runners.items()
(variables rid, hashes, old_hashes, changes) to store the full lists (use 'new':
hashes and 'old': old_hashes) while preserving None when absent, and make the
same change in the other similar blocks (the blocks you noted at the other
ranges) so diffs/UI show full hash lists instead of only the first element.
- Around line 390-391: The script never writes the file
runners-versions_generated.rst; add a writer analogous to the runners-page block
by creating a path via json_path.with_name('runners-versions_generated.rst') and
calling write_text on the runners_versions content (e.g., join the
runners_versions list with '\n' + trailing '\n'). Do the same fix for the second
occurrence mentioned (the analogous block around lines 489-490) so both places
that emit runners-page_generated.rst/changelog_generated.rst also emit
runners-versions_generated.rst using the runners_versions variable and a
runners_versions_path.
- Around line 41-50: The git tag fetch currently uses subprocess.run(['git',
'fetch', '--tags'], capture_output=True) and silently ignores failures; change
it to run with check=True (or validate proc.returncode) and propagate/report
errors so the script exits on failure; specifically update the fetch invocation
around the git fetch --tags call (and include stderr in any logged/raised
message) so that later steps like proc_tags = subprocess.run(['git', 'tag',
'-l', '-n1'], ...) never proceed with a partial repo state.
---
Nitpick comments:
In `@doc/website/src/conf.py`:
- Around line 41-64: Move the inline imports "import re as _re" and
"urllib.request" to the top-level imports of conf.py and use the module-level
logger (e.g., logging.getLogger(__name__)) to log failures; in the try/except
that populates _remote_versions, catch Exception as e and call logger.warning
(or logger.exception) with a clear message that includes the exception details
so fetch failures are visible, leaving the existing fallback to set
_remote_versions = []; ensure references like _semver_sort_key,
_remote_versions, and the final Path(...).write_text remain unchanged.
In `@doc/website/src/python-sdk/changelog/v0.1.3.rst`:
- Around line 1-116: The doc "Changelog v0.1.3" duplicates the content from the
canonical notes file; remove the duplicated body in this changelog and replace
it with an RST include directive that pulls in the shared content from
changelog-notes/v0.1.3.rst (keep the "Changelog v0.1.3" title in this file),
ensure the include path is correct relative to this document and that any
headings or directives still render as before, and delete the duplicated
sections currently present between the title and the end of the file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1cbd5299-06c7-44d9-b575-1577e9e0d864
⛔ Files ignored due to path filters (6)
doc/website/src/_static/favicon-dark.pngis excluded by!**/*.pngdoc/website/src/_static/favicon.pngis excluded by!**/*.pngdoc/website/src/_static/favicon.svgis excluded by!**/*.svgdoc/website/src/_static/logo-dark.svgis excluded by!**/*.svgdoc/website/src/_static/logo-light.svgis excluded by!**/*.svgdoc/website/src/_static/switzer-regular.woff2is excluded by!**/*.woff2
📒 Files selected for processing (29)
.github/workflows/incl_docs.ymldoc/website/src/_static/custom.cssdoc/website/src/_static/favicon-swap.jsdoc/website/src/_static/llms.txtdoc/website/src/conf.pydoc/website/src/impl-spec/appendix/index.rstdoc/website/src/impl-spec/appendix/runners-versions.rstdoc/website/src/impl-spec/index.rstdoc/website/src/index.rstdoc/website/src/overview/glossary.rstdoc/website/src/overview/index.rstdoc/website/src/overview/key-concepts.rstdoc/website/src/overview/what-is-genvm.rstdoc/website/src/python-sdk/changelog-notes/v0.1.3.rstdoc/website/src/python-sdk/changelog-notes/v0.1.8.rstdoc/website/src/python-sdk/changelog.rstdoc/website/src/python-sdk/changelog/index.rstdoc/website/src/python-sdk/changelog/v0.1.3.rstdoc/website/src/python-sdk/changelog/v0.1.8.rstdoc/website/src/python-sdk/guides/boot_process.rstdoc/website/src/python-sdk/guides/floating_point.rstdoc/website/src/python-sdk/guides/index.rstdoc/website/src/python-sdk/index.rstdoc/website/src/python-sdk/introduction.rstdoc/website/src/python-sdk/reference/genlayer.rstdoc/website/src/python-sdk/reference/genlayer_embeddings.rstdoc/website/src/python-sdk/reference/index.rstdoc/website/src/python-sdk/runners/index.rstrunners/support/match-tags.py
💤 Files with no reviewable changes (1)
- doc/website/src/impl-spec/appendix/index.rst
runners/support/match-tags.py
Outdated
| for rid, hashes in runners.items(): | ||
| old_hashes = prev_runners.get(rid) | ||
| if old_hashes is None: | ||
| # Runner newly introduced | ||
| changes[rid] = {'old': None, 'new': hashes[0] if hashes else None} | ||
| elif set(hashes) != set(old_hashes): | ||
| changes[rid] = {'old': old_hashes[0] if old_hashes else None, 'new': hashes[0] if hashes else None} |
There was a problem hiding this comment.
Preserve the full hash list per runner.
res[ver][rid] is a list, but the generated diff/history/UI only keep hashes[0]. A change from [a, b] to [a, c] is detected here, then reported downstream as a -> a, which makes the generated docs incorrect for multi-artifact runners.
Also applies to: 196-203, 296-323, 327-335
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@runners/support/match-tags.py` around lines 140 - 146, The code only records
the first hash (hashes[0] / old_hashes[0]) when populating changes, which loses
multi-hash runner history; update the change assignments in the loop that
iterates over runners.items() (variables rid, hashes, old_hashes, changes) to
store the full lists (use 'new': hashes and 'old': old_hashes) while preserving
None when absent, and make the same change in the other similar blocks (the
blocks you noted at the other ranges) so diffs/UI show full hash lists instead
of only the first element.
- Reset stale preferred flags in version switcher jq pipeline - Remove ineffective CSS favicon rule (JS handles it) - Move import datetime to top of conf.py - Fix grammar: "have aliases" → "has aliases" in genlayer.rst - Add check=True to git fetch --tags in match-tags.py - Write runners-versions_generated.rst for backwards compat
Summary
Major overhaul of the GenVM SDK documentation site (sdk.genlayer.com):
match-tags.py, hand-written migration guides preserved (v0.1.3, v0.1.8), collapsible runner sectionsllms.txtstandard file, robot icon in navbar linking to text docsversions.jsonand merges with local build sorted by semver; no longer hardcodes remote URL whenDOCS_DOMAINis unsetNo existing spec/internals content was modified — only restructured and wrapped with new navigation.
Test plan
Summary by CodeRabbit
New Features
Documentation