-
Notifications
You must be signed in to change notification settings - Fork 2
Fix genlayer-node/_meta.json removal #297
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
Conversation
WalkthroughUpdates 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
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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
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
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for genlayer-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this 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 265YAMLlint 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 deletionsHere 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 targetsThe 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.
📒 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 tradeoffDisabling 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 deletionSwitching 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 confirmedVerified that
.github/scripts/sync-artifact-files.shusesrsync -av --deletewithout any--excludeoptions, 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.
0f8c614 to
b36da3c
Compare
There was a problem hiding this 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 whitespaceThere’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 navThe 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 indexIf 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.
📒 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 onlyThe
sync-artifact-files.shscript invokesrsync -av --deleteseparately for each"$source_path/" → "$target_path/", wheretarget_pathis one of the explicit subdirectories (e.g.pages/api-references/genlayer-node/gen,…/debug,…/ops). Since rsync’s--deleteflag only applies within the specified target directory, siblings in the parent (such as_meta.json) are never passed to rsync and therefore remain untouched.
Fix pages/api-references/genlayer-node/_meta.json removal
Summary by CodeRabbit
Documentation
Chores