Skip to content

Conversation

@flyingrobots
Copy link
Owner

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2025

Summary by CodeRabbit

  • New Features
    • Added a build script to generate arXiv-ready submission packages for the aion-holography project, automating the preparation and packaging process.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Adds a new Bash script aion-holography/scripts/make-arxiv.sh that compiles the LaTeX source (latexmk), collects Makefile/.tex/main.bbl via rsync into a temp workdir, strips full-line comments from .tex files, and creates an arXiv-ready tarball with cleanup and strict shell options.

Changes

Cohort / File(s) Change Summary
New arXiv build script
aion-holography/scripts/make-arxiv.sh
New Bash script: sets strict shell options (set -euo pipefail), defines paths, runs latexmk to refresh main.bbl, creates a temporary workdir, uses rsync to collect Makefile, *.tex, and main.bbl, strips full-line comments from .tex files (preserving inline comments), packs the workdir into ax.tar, and ensures cleanup via trap.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer / CI
    participant Script as make-arxiv.sh
    participant LaTeX as latexmk
    participant Rsync as rsync
    participant Sed as sed
    participant Tar as tar
    Note over Script: start (set -euo pipefail + trap)
    Dev->>Script: run script
    Script->>LaTeX: run latexmk(main.tex)
    alt latexmk success
        LaTeX-->>Script: main.bbl updated
        Script->>Rsync: rsync Makefile, *.tex, main.bbl -> tmpdir
        Rsync-->>Script: files copied
        Script->>Sed: strip full-line comments from *.tex in tmpdir
        Sed-->>Script: cleaned files
        Script->>Tar: create ax.tar from tmpdir
        Tar-->>Script: ax.tar created
        Script-->>Dev: output path to ax.tar (success)
    else latexmk failure
        LaTeX-->>Script: error
        Script-->>Dev: exit with error (cleanup)
    end
    Note over Script: cleanup tmpdir (trap)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Potential focus areas:

  • Shell quoting/expansions in rsync and sed (spaces, special chars, edge cases).
  • Correctness of the sed regex for stripping comments while preserving inline comments.
  • rsync include/exclude filter semantics and directory recursion behavior.
  • Robustness of trap and cleanup for all exit paths and signals.
  • Portability between GNU vs BSD sed/tar/rsync variants.

Poem

A tiny script with surgical art,
Strips the comments, packs every part.
latexmk hums, rsync gathers the crew,
sed trims the noise — tar makes it new.
Ax.tar departs, tidy as dew. ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a description explaining the purpose of the arXiv packaging script, why it's needed, and how to use it.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the primary change: adding a Bash script for packaging arXiv tarballs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch scripts/make-arxiv

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4ae4c5 and 0cd96f8.

📒 Files selected for processing (1)
  • aion-holography/scripts/make-arxiv.sh (1 hunks)
⏰ 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). (1)
  • GitHub Check: build-holography
🔇 Additional comments (3)
aion-holography/scripts/make-arxiv.sh (3)

1-18: Error-handling setup and path initialization look solid.

The use of set -euo pipefail is correct, and the ROOT variable calculation properly uses subshell cd to find the repo root. No issues here.


20-22: PDF build step is acceptable.

The latexmk invocation will fail-fast if compilation fails (caught by set -e), and stdout suppression is intentional. No concerns.


41-43: Tar packaging looks good.

The -cf flags are correct, and the verbose flag appears to have been already removed. The /dev/null redirect is consistent with your stdout-suppression pattern elsewhere. No issues.


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
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: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 87dc028 and c4ae4c5.

📒 Files selected for processing (1)
  • aion-holography/scripts/make-arxiv.sh (1 hunks)
🔇 Additional comments (1)
aion-holography/scripts/make-arxiv.sh (1)

1-43: Overall script structure is sound, but error propagation is fragile.

The script properly uses set -euo pipefail and trap-based cleanup, which is excellent practice. However, the subshell in the comment-stripping loop undermines the error-handling guarantees. The fixes above (especially the process substitution refactor) will resolve the critical issue and ensure consistent behavior across the script.

Please verify that:

  1. The directory structure assumptions (script at aion-holography/scripts/make-arxiv.sh) match your repository layout.
  2. Nested .tex files (if any exist in subdirectories) should be comment-stripped and included in the arXiv tarball.

flyingrobots and others added 2 commits November 26, 2025 17:45
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: James Ross <james@flyingrobots.dev>
@flyingrobots flyingrobots merged commit e667412 into main Nov 27, 2025
2 checks passed
@flyingrobots flyingrobots deleted the scripts/make-arxiv branch November 27, 2025 02:06
@coderabbitai coderabbitai bot mentioned this pull request Nov 27, 2025
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