Skip to content

Update prep script#57

Open
Siddharth2207 wants to merge 3 commits intomainfrom
2026-03-02-update-prep
Open

Update prep script#57
Siddharth2207 wants to merge 3 commits intomainfrom
2026-03-02-update-prep

Conversation

@Siddharth2207
Copy link
Collaborator

@Siddharth2207 Siddharth2207 commented Mar 2, 2026

Motivation

  • Update prep script to initialize the submodules.
  • Initialize docs for dev server.

Checks

By submitting this for review, I'm confirming I've done the following:

  • added comprehensive test coverage for any changes in logic
  • made this PR as small as possible
  • linked any relevant issues or PRs
  • included screenshots (if this involves a change to a front-end/dashboard)

Summary by CodeRabbit

  • Chores
    • Setup now initializes and updates the project submodule automatically before running the main preparation sequence.
  • Documentation
    • Added a documentation build step that compiles the docs and replaces the existing published docs with the freshly built output.

@Siddharth2207 Siddharth2207 requested a review from findolor March 2, 2026 11:56
@coderabbitai
Copy link

coderabbitai bot commented Mar 2, 2026

📝 Walkthrough

Walkthrough

prep.sh now initializes and recursively updates the repository submodules, runs the existing rain.orderbook prep-base step, then builds st0x-docs and replaces docs/book with the generated build output to ensure docs reflect the updated submodule.

Changes

Cohort / File(s) Summary
Prep script (submodule + docs)
prep.sh
Added git submodule update --init --recursive before calling the existing rain.orderbook prep-base; added a docs build step (nix build .#st0x-docs), removed docs/book, and copied the built docs into docs/book. Existing script flags (set -euxo pipefail) and subsequent flow remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐇 I nudged a submodule, gave docs a shove,
Built the book with a hop and a bit of love,
Replaced the pages, neat and spry,
A tiny bash hop, and off they fly.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Update prep script' is vague and generic, using non-descriptive language that doesn't convey what specific changes were made to the prep script. Consider a more specific title that describes the main changes, such as 'Initialize submodules and build docs in prep script' or 'Add submodule initialization and docs build to prep script'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 2026-03-02-update-prep

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@prep.sh`:
- Around line 7-8: The script currently runs git submodule update --init
--recursive which updates every submodule; change it to only initialize/update
the ethgild submodule by invoking git submodule update --init --recursive
ethgild (or the ethgild path) in prep.sh so the command matches the echo
"Initializing ethgild submodule..." intent and avoids touching unrelated
submodules.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ceb5177 and 85f9358.

📒 Files selected for processing (1)
  • prep.sh

Copy link

@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.

♻️ Duplicate comments (1)
prep.sh (1)

6-8: ⚠️ Potential issue | 🟡 Minor

Scope submodule update to ethgild only.

Line 8 updates all submodules recursively, which is broader than the Line 7 intent and PR objective. This can introduce unrelated update failures and extra prep time. Use the specific submodule path (for example, ethgild).

Suggested patch
 echo "Initializing ethgild submodule..."
-git submodule update --init --recursive
+git submodule update --init --recursive ethgild
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@prep.sh` around lines 6 - 8, In prep.sh replace the unrestricted git
submodule update invocation (the line containing "git submodule update --init
--recursive") with a scoped update that targets only the ethgild submodule (and
retain --recursive only if ethgild has nested submodules) so the script
initializes/updates ethgild specifically rather than all submodules.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@prep.sh`:
- Around line 6-8: In prep.sh replace the unrestricted git submodule update
invocation (the line containing "git submodule update --init --recursive") with
a scoped update that targets only the ethgild submodule (and retain --recursive
only if ethgild has nested submodules) so the script initializes/updates ethgild
specifically rather than all submodules.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85f9358 and 078d01b.

📒 Files selected for processing (1)
  • prep.sh

Copy link

@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.

🧹 Nitpick comments (1)
prep.sh (1)

13-16: Non-atomic docs replacement could leave partial state on failure.

If cp fails midway (e.g., disk full), you'll have removed the old docs without a complete replacement. For a prep script this may be acceptable, but a safer pattern exists.

Additionally, if the docs/ directory doesn't exist, the cp will fail.

💡 Safer replacement pattern (optional)
 echo "Building docs..."
 nix build .#st0x-docs
+mkdir -p docs
-rm -rf docs/book
-cp -r result docs/book
+rm -rf docs/book.new
+cp -r result docs/book.new
+rm -rf docs/book
+mv docs/book.new docs/book

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 078d01b and 927d92d.

📒 Files selected for processing (1)
  • prep.sh

@Siddharth2207 Siddharth2207 self-assigned this Mar 2, 2026
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.

1 participant