Skip to content

Conversation

@dohernandez
Copy link
Member

@dohernandez dohernandez commented Aug 26, 2025

Fix pages/api-references/genlayer-node/_meta.json removal

Summary by CodeRabbit

  • Documentation

    • Reorganized API Reference navigation into four grouped separators (GenLayer, Debug, Ops, Test) for clearer browsing.
    • Improved documentation sync to handle dedicated sub-sections, ensuring more accurate and complete updates.
  • Chores

    • Updated CI workflow to improve artifact handling during documentation generation, enhancing reliability of published docs and reviews.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 26, 2025

Walkthrough

Updates the GitHub Actions docs-sync workflow to apply three specific subpaths (gen, debug, ops) when syncing artifacts and adds a new UI metadata file grouping gen/debug/ops method entries under pages/api-references/genlayer-node/_meta.json.

Changes

Cohort / File(s) Summary
Workflow: docs sync
.github/workflows/sync-docs-from-node.yml
Adjusts Generate Documentation stage: Invoke sync-artifact-files.sh with three explicit subpaths pages/api-references/genlayer-node/gen, .../debug, .../ops (instead of a single path).
Docs UI metadata
pages/api-references/genlayer-node/_meta.json
Adds a JSON _meta.json defining separators for gen ("GenLayer Methods"), debug ("Debug Methods"), ops ("Ops Methods"), and test ("Test Methods").

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant GH as GitHub Actions
  participant Sync as sync-artifact-files.sh
  participant Repo as Docs Repo

  Dev->>GH: Push / trigger workflow
  GH->>GH: Generate Documentation stage
  note right of GH #f0f4ff: CLEANUP_ARTIFACTS unchanged here
  GH->>Sync: Apply synced files -> pages/.../gen
  Sync->>Repo: Write gen files
  GH->>Sync: Apply synced files -> pages/.../debug
  Sync->>Repo: Write debug files
  GH->>Sync: Apply synced files -> pages/.../ops
  Sync->>Repo: Write ops files
  note over Repo #f7fff0: `_meta.json` defines separators for gen/debug/ops/test
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • cristiam86

Poem

I nibble through YAML, soft and spry,
Three tidy paths beneath the sky.
Gen, Debug, Ops — each in a row,
A meta-map to help them show.
Carrots of docs, aligned just so. 🥕

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/node/v0.3

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.

❤️ 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@netlify
Copy link

netlify bot commented Aug 26, 2025

Deploy Preview for genlayer-docs ready!

Name Link
🔨 Latest commit b36da3c
🔍 Latest deploy log https://app.netlify.com/projects/genlayer-docs/deploys/68adce173f36010008a2c34e
😎 Deploy Preview https://deploy-preview-297--genlayer-docs.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 project configuration.

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 (3)
.github/workflows/sync-docs-from-node.yml (2)

265-265: Fix YAML lint issue: trailing space on Line 265

YAMLlint flags a trailing space after the ops path. Remove it to keep the workflow clean.

-            "pages/api-references/genlayer-node/ops" 
+            "pages/api-references/genlayer-node/ops"

326-330: Align final “Apply documentation” step with selective sync to avoid unintended deletions

Here you sync the entire pages/api-references directory. For consistency with the earlier step—and to further protect parent-level metadata like _meta.json—consider narrowing to the same subpaths. This also aligns with the team preference for selective scoping during sync/staging.

-          .github/scripts/sync-artifact-files.sh temp-final . \
-            "content/validators" \
-            "pages/validators" \
-            "pages/api-references"
+          .github/scripts/sync-artifact-files.sh temp-final . \
+            "content/validators" \
+            "pages/validators" \
+            "pages/api-references/genlayer-node/gen" \
+            "pages/api-references/genlayer-node/debug" \
+            "pages/api-references/genlayer-node/ops"

Note: If the intent is to sync other api-references areas beyond genlayer-node, list them explicitly to preserve any hand-authored root-level files.

pages/api-references/genlayer-node/_meta.json (1)

1-14: LGTM: separators for gen/debug/ops align with the workflow sync targets

The separators match the subdirectory names being synced and will keep the sidebar grouped even when files are updated automatically. If you want deterministic ordering of these groups relative to any other entries at this level, consider adding a dedicated ordering key in the site’s convention (if supported), otherwise this is good to go.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ce28c8e and abdf2ac.

📒 Files selected for processing (2)
  • .github/workflows/sync-docs-from-node.yml (2 hunks)
  • pages/api-references/genlayer-node/_meta.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
pages/**/_meta.json

📄 CodeRabbit inference engine (CLAUDE.md)

pages/**/_meta.json: Navigation is controlled by _meta.json files in each directory
Edit _meta.json files to change page ordering or titles
Update corresponding _meta.json to include the new page when adding new pages

Files:

  • pages/api-references/genlayer-node/_meta.json
🧠 Learnings (4)
📓 Common learnings
Learnt from: dohernandez
PR: genlayerlabs/genlayer-docs#257
File: .github/workflows/sync-docs-from-node.yml:0-0
Timestamp: 2025-07-26T13:26:45.588Z
Learning: In the sync-docs-from-node.yml workflow, the user prefers selective git staging with `git add content/validators pages/api-references pages/validators` rather than `git add -A` to avoid staging unintended changes, as these are the expected directories to be modified during the documentation sync process.
📚 Learning: 2025-07-26T13:26:45.588Z
Learnt from: dohernandez
PR: genlayerlabs/genlayer-docs#257
File: .github/workflows/sync-docs-from-node.yml:0-0
Timestamp: 2025-07-26T13:26:45.588Z
Learning: In the sync-docs-from-node.yml workflow, the user prefers selective git staging with `git add content/validators pages/api-references pages/validators` rather than `git add -A` to avoid staging unintended changes, as these are the expected directories to be modified during the documentation sync process.

Applied to files:

  • .github/workflows/sync-docs-from-node.yml
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
PR: genlayerlabs/genlayer-docs#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to scripts/generate-full-docs.js : Build process includes automatic generation of full documentation concatenation (scripts/generate-full-docs.js) and sitemap generation (scripts/generate-sitemap-xml.js)

Applied to files:

  • .github/workflows/sync-docs-from-node.yml
📚 Learning: 2025-08-19T21:48:24.895Z
Learnt from: epsjunior
PR: genlayerlabs/genlayer-docs#278
File: components/copy-page.tsx:0-0
Timestamp: 2025-08-19T21:48:24.895Z
Learning: In the genlayer-docs project, markdown files are generated during the build process via `npm run sync-mdx`. If markdown generation fails, the entire deployment process fails, ensuring that markdown files will always exist in production environments.

Applied to files:

  • .github/workflows/sync-docs-from-node.yml
🪛 YAMLlint (1.37.1)
.github/workflows/sync-docs-from-node.yml

[error] 265-265: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Create Pull Request
  • GitHub Check: Redirect rules - genlayer-docs
  • GitHub Check: Header rules - genlayer-docs
  • GitHub Check: Pages changed - genlayer-docs
🔇 Additional comments (3)
.github/workflows/sync-docs-from-node.yml (3)

39-39: Defaulting CLEANUP_ARTIFACTS to false — confirm intended retention/storage tradeoff

Disabling cleanup by default is fine, especially with retention-days=1 on artifacts. Just confirm this won’t bloat storage if manual runs accumulate.


263-266: Good fix: limit sync scope to subdirectories to prevent parent _meta.json deletion

Switching to explicit paths for gen/debug/ops avoids clobbering pages/api-references/genlayer-node/_meta.json at the directory root. This directly addresses the removal issue described in the PR.


257-266: Sync script mirror-delete behavior confirmed

Verified that .github/scripts/sync-artifact-files.sh uses rsync -av --delete without any --exclude options, so:

  • It does not exclude underscore-prefixed files (e.g. _meta.json).
  • It employs a mirror‐style delete, removing stale files only under the explicitly listed sync paths.
  • Because we’ve narrowed the paths passed to the script, there’s no risk of accidental deletions outside those directories.

No changes needed.

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 (3)
.github/workflows/sync-docs-from-node.yml (1)

265-265: Fix YAML lint error: trailing whitespace

There’s trailing whitespace at the end of Line 265 flagged by yamllint. Remove it to keep CI green.

-            "pages/api-references/genlayer-node/ops" 
+            "pages/api-references/genlayer-node/ops"
pages/api-references/genlayer-node/_meta.json (2)

1-18: Separators look good; verify the “test” group or remove to avoid empty nav

The gen/debug/ops separators align with the new sync paths. The “test” separator has no corresponding synced subpath and may render an empty section. Either add pages/api-references/genlayer-node/test (with an index.mdx), extend the workflow to sync that subpath, or drop the entry for now.

Option A — remove “test” until content exists:

   "ops": {
     "title": "Ops Methods",
     "type": "separator"
   },
-  "test": {
-    "title": "Test Methods",
-    "type": "separator"
-  }
+  

Option B — keep “test” and add a stub page:

  • Create pages/api-references/genlayer-node/test/index.mdx with a short “Coming soon” note.
  • Add "pages/api-references/genlayer-node/test" to the Generate Documentation “Apply synced files” step when content is ready.

1-18: Optional: add a section title for the directory index

If you want a friendly title on the landing page, consider adding an index entry.

 {
+  "index": {
+    "title": "GenLayer Node RPC"
+  },
   "gen": {
     "title": "GenLayer Methods",
     "type": "separator"
   },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between abdf2ac and 0f8c614.

📒 Files selected for processing (2)
  • .github/workflows/sync-docs-from-node.yml (1 hunks)
  • pages/api-references/genlayer-node/_meta.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
pages/**/_meta.json

📄 CodeRabbit inference engine (CLAUDE.md)

pages/**/_meta.json: Navigation is controlled by _meta.json files in each directory
Edit _meta.json files to change page ordering or titles
Update corresponding _meta.json to include the new page when adding new pages

Files:

  • pages/api-references/genlayer-node/_meta.json
🧠 Learnings (4)
📓 Common learnings
Learnt from: dohernandez
PR: genlayerlabs/genlayer-docs#257
File: .github/workflows/sync-docs-from-node.yml:0-0
Timestamp: 2025-07-26T13:26:45.588Z
Learning: In the sync-docs-from-node.yml workflow, the user prefers selective git staging with `git add content/validators pages/api-references pages/validators` rather than `git add -A` to avoid staging unintended changes, as these are the expected directories to be modified during the documentation sync process.
📚 Learning: 2025-07-26T13:26:45.588Z
Learnt from: dohernandez
PR: genlayerlabs/genlayer-docs#257
File: .github/workflows/sync-docs-from-node.yml:0-0
Timestamp: 2025-07-26T13:26:45.588Z
Learning: In the sync-docs-from-node.yml workflow, the user prefers selective git staging with `git add content/validators pages/api-references pages/validators` rather than `git add -A` to avoid staging unintended changes, as these are the expected directories to be modified during the documentation sync process.

Applied to files:

  • .github/workflows/sync-docs-from-node.yml
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
PR: genlayerlabs/genlayer-docs#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to scripts/generate-full-docs.js : Build process includes automatic generation of full documentation concatenation (scripts/generate-full-docs.js) and sitemap generation (scripts/generate-sitemap-xml.js)

Applied to files:

  • .github/workflows/sync-docs-from-node.yml
📚 Learning: 2025-08-19T21:48:24.895Z
Learnt from: epsjunior
PR: genlayerlabs/genlayer-docs#278
File: components/copy-page.tsx:0-0
Timestamp: 2025-08-19T21:48:24.895Z
Learning: In the genlayer-docs project, markdown files are generated during the build process via `npm run sync-mdx`. If markdown generation fails, the entire deployment process fails, ensuring that markdown files will always exist in production environments.

Applied to files:

  • .github/workflows/sync-docs-from-node.yml
🪛 YAMLlint (1.37.1)
.github/workflows/sync-docs-from-node.yml

[error] 265-265: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules - genlayer-docs
  • GitHub Check: Header rules - genlayer-docs
  • GitHub Check: Pages changed - genlayer-docs
🔇 Additional comments (1)
.github/workflows/sync-docs-from-node.yml (1)

263-265: Verification complete: delete scoped per-subpath only

The sync-artifact-files.sh script invokes rsync -av --delete separately for each "$source_path/" → "$target_path/", where target_path is one of the explicit subdirectories (e.g. pages/api-references/genlayer-node/gen, …/debug, …/ops). Since rsync’s --delete flag only applies within the specified target directory, siblings in the parent (such as _meta.json) are never passed to rsync and therefore remain untouched.

@dohernandez dohernandez merged commit be95d21 into main Aug 26, 2025
5 checks passed
@dohernandez dohernandez deleted the docs/node/v0.3 branch August 26, 2025 15:11
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.

2 participants