Repository navigation
Dotfile and symlink management - #3
Conversation
…ifests and improve dotfiles strategy documentation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ 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 (4)
📝 WalkthroughWalkthroughThis PR removes archived installation configurations, reorganizes project documentation with clearer structured guides, and enhances the bootstrap workflow with improved SSH key management and dotfiles handling. Multiple runner scripts are refactored to strengthen security practices and idempotency. Changes
Sequence Diagram(s)The changes primarily consist of archive cleanup, documentation reorganization, and incremental enhancements to existing runner scripts. While individual modules (git-ssh, dotfiles) gain additional logic, the overall changes do not introduce a new integrated feature with 3+ distinct components and a clear sequential flow that would warrant visualization beyond the documentation already provided. Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 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. Review rate limit: 0/1 reviews remaining, refill in 44 minutes and 3 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
runs/30-git-ssh (1)
46-99:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRespect
DRY_RUNfor interactive and network operations.Dry-run currently still executes interactive prompts (Line 51), reads/prints key material (Line 62), and performs live SSH connectivity checks (Line 89). This can fail in dry-run and violates the runner contract.
Proposed fix
if [[ -f "$SSH_KEY_PATH" ]]; then log_info "SSH key already exists: $SSH_KEY_PATH" else + if [[ "${DRY_RUN:-0}" == "1" ]]; then + log_info "would generate personal SSH key at: $SSH_KEY_PATH" + elif [[ -t 0 ]]; then - if [[ -t 0 ]]; then log_info "Generating personal SSH key ($SSH_KEY_NAME)..." run_cmd mkdir -p "$HOME/.ssh" run_cmd chmod 700 "$HOME/.ssh" @@ - cat "${SSH_KEY_PATH}.pub" + cat "${SSH_KEY_PATH}.pub" @@ - else + else log_warn "Non-interactive shell — skipping SSH key generation (run interactively to set up)" fi fi @@ log_info "Testing SSH connectivity to GitHub..." -ssh_output="$(ssh -T git@github.com 2>&1 || true)" +if [[ "${DRY_RUN:-0}" == "1" ]]; then + log_info "would test SSH connectivity to GitHub" +else + ssh_output="$(ssh -T git@github.com 2>&1 || true)" -if echo "$ssh_output" | grep -qi "successfully authenticated"; then - log_success "SSH authentication to GitHub working" -else - log_warn "SSH authentication to GitHub failed — key may not be registered yet" - log_info "Add your key at: https://github.com/settings/ssh/new" - if [[ -f "${SSH_KEY_PATH}.pub" ]]; then - log_info "Public key: $(cat "${SSH_KEY_PATH}.pub")" + if echo "$ssh_output" | grep -qi "successfully authenticated"; then + log_success "SSH authentication to GitHub working" + else + log_warn "SSH authentication to GitHub failed — key may not be registered yet" + log_info "Add your key at: https://github.com/settings/ssh/new" + if [[ -f "${SSH_KEY_PATH}.pub" ]]; then + log_info "Public key: $(cat "${SSH_KEY_PATH}.pub")" + fi fi -fi +fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@runs/30-git-ssh` around lines 46 - 99, The script currently ignores DRY_RUN when doing interactive prompts, printing key material, and network tests; update the interactive/key-generation block (around read -rp, ssh-keygen, and cat "${SSH_KEY_PATH}.pub") and the SSH connectivity/test block (ssh -T git@github.com, ssh-agent/ssh-add invocations) to first check DRY_RUN (e.g. if [[ "${DRY_RUN:-}" == "true" ]] then skip prompts, generation, printing and network tests), and when DRY_RUN is set only log what would have been done (use log_info/log_warn) instead of running ssh-keygen, ssh-add, ssh-agent, cat, or ssh -T so no interactive or network operations execute during dry runs.
🧹 Nitpick comments (1)
runs/80-dotfiles (1)
137-146: 💤 Low valueNon-symlink files are warned but don't cause failure.
When a path exists but is not a symlink (line 140-141), it's logged as a warning but doesn't increment the error count. This means the module will succeed even if
ensure_symlinkfailed to replace a file with a symlink.If
ensure_symlinkran successfully, this case shouldn't occur (it backs up existing files before symlinking). However, if the user manually created a file after the symlink was made, or ifensure_symlinksilently failed, the verification would pass with just a warning.Consider incrementing
errorshere to enforce that all paths must be symlinks for the module to succeed.💡 Optional: treat non-symlinks as errors
if [[ -L "$link" ]]; then log_success "symlink OK: $link" elif [[ -e "$link" ]]; then - log_warn "exists but not a symlink: $link" + log_error "exists but not a symlink: $link" + errors=$((errors + 1)) else log_error "missing: $link" errors=$((errors + 1))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@runs/80-dotfiles` around lines 137 - 146, The verification loop over VERIFY_LINKS currently treats existing non-symlink paths as warnings only; update the elif branch (the check using [[ -e "$link" ]]) to treat this as a failure by incrementing errors (errors=$((errors + 1))) and/or switching the call from log_warn to log_error so a non-symlinked path causes the module to fail; this ensures mismatches after ensure_symlink (or silent failures) are surfaced.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/06-tool-inventory.md`:
- Line 58: Update the zoxide row in docs/06-tool-inventory.md so the Ubuntu
install method reflects the actual behavior in runs/10-core-cli: change the
"manual" entry to "apt/manual" (or "apt → manual") to indicate it attempts apt
install first and falls back to manual; reference the table row containing
"zoxide" and the workflow file runs/10-core-cli for consistency.
In `@docs/09-bootstrap-and-onboarding.md`:
- Around line 163-164: Update the Docker section text to match current test
behavior: change the claim that "80-dotfiles" is safe in Docker to state that
the "80-dotfiles" script is currently skipped by Docker smoke tests, while
"99-manual" remains safe (prints text); reference the test entries that perform
the skip (tests/docker-arch and tests/docker-ubuntu) and adjust the wording so
documentation reflects that "80-dotfiles" is not run in Docker smoke tests.
In `@run`:
- Line 9: There is a typo in the usage comment string "# ./run --help
# sprints available flags" — change "sprints available flags" to "prints
available flags" so the comment reads "# ./run --help #
prints available flags"; update the exact comment text in the run script where
that string occurs.
---
Outside diff comments:
In `@runs/30-git-ssh`:
- Around line 46-99: The script currently ignores DRY_RUN when doing interactive
prompts, printing key material, and network tests; update the
interactive/key-generation block (around read -rp, ssh-keygen, and cat
"${SSH_KEY_PATH}.pub") and the SSH connectivity/test block (ssh -T
git@github.com, ssh-agent/ssh-add invocations) to first check DRY_RUN (e.g. if
[[ "${DRY_RUN:-}" == "true" ]] then skip prompts, generation, printing and
network tests), and when DRY_RUN is set only log what would have been done (use
log_info/log_warn) instead of running ssh-keygen, ssh-add, ssh-agent, cat, or
ssh -T so no interactive or network operations execute during dry runs.
---
Nitpick comments:
In `@runs/80-dotfiles`:
- Around line 137-146: The verification loop over VERIFY_LINKS currently treats
existing non-symlink paths as warnings only; update the elif branch (the check
using [[ -e "$link" ]]) to treat this as a failure by incrementing errors
(errors=$((errors + 1))) and/or switching the call from log_warn to log_error so
a non-symlinked path causes the module to fail; this ensures mismatches after
ensure_symlink (or silent failures) are surfaced.
🪄 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: a3a59e6b-a6a2-41d6-bf94-6812cd962838
📒 Files selected for processing (38)
archive/installation/applications/keepassxc.tomlarchive/installation/applications/obsidian.tomlarchive/installation/applications/onlyoffice.tomlarchive/installation/applications/zen.tomlarchive/installation/packages/arch-based.tomlarchive/installation/packages/programming-tools/_missing-compose.tomlarchive/installation/packages/programming-tools/_missing-docker.tomlarchive/installation/packages/programming-tools/_missing-hcloud.tomlarchive/installation/packages/programming-tools/_missing-packer.tomlarchive/installation/packages/programming-tools/_missing-php.tomlarchive/installation/packages/programming-tools/_missing-uv.tomlarchive/installation/packages/programming-tools/elixir.tomlarchive/installation/packages/programming-tools/erlang.tomlarchive/installation/packages/programming-tools/gleam.tomlarchive/installation/packages/programming-tools/go.tomlarchive/installation/packages/programming-tools/gradle.tomlarchive/installation/packages/programming-tools/java.tomlarchive/installation/packages/programming-tools/kotlin.tomlarchive/installation/packages/programming-tools/maven.tomlarchive/installation/packages/programming-tools/node.tomlarchive/installation/packages/programming-tools/opentofu.tomlarchive/installation/packages/programming-tools/terraform.tomlarchive/installation/packages/todo.txtarchive/runs/asdfdocs/03-implementation-plan.mddocs/04-testing-strategy.mddocs/06-tool-inventory.mddocs/08-milestone-1-arch-mvp.mddocs/09-bootstrap-and-onboarding.mddocs/10-dotfiles-strategy.mdrunruns/10-core-cliruns/30-git-sshruns/80-dotfilesruns/99-manualtests/README.mdtests/docker-archtests/docker-ubuntu
💤 Files with no reviewable changes (20)
- archive/installation/applications/zen.toml
- archive/installation/applications/obsidian.toml
- archive/installation/applications/keepassxc.toml
- archive/installation/packages/programming-tools/elixir.toml
- archive/installation/applications/onlyoffice.toml
- docs/03-implementation-plan.md
- archive/installation/packages/programming-tools/maven.toml
- archive/installation/packages/programming-tools/kotlin.toml
- archive/installation/packages/programming-tools/gradle.toml
- docs/04-testing-strategy.md
- archive/installation/packages/todo.txt
- archive/installation/packages/programming-tools/java.toml
- archive/installation/packages/programming-tools/terraform.toml
- archive/installation/packages/programming-tools/opentofu.toml
- archive/installation/packages/arch-based.toml
- archive/installation/packages/programming-tools/go.toml
- archive/installation/packages/programming-tools/erlang.toml
- archive/installation/packages/programming-tools/node.toml
- archive/installation/packages/programming-tools/gleam.toml
- archive/runs/asdf
| | fzf | cli ux | 10-core-cli | pacman | apt | brew | `fzf --version` | m1 | | ||
| | starship | shell prompt | 20-shell | pacman | apt | brew | `starship --version` | m1 | | ||
| | eza | cli ux | 10-core-cli | pacman | manual | brew | `eza --version` | m1 | | ||
| | zoxide | cli ux | 10-core-cli | pacman | manual | brew | `zoxide --version` | m1 | |
There was a problem hiding this comment.
Align Ubuntu zoxide method with current module behavior.
Line 58 lists Ubuntu as manual, but runs/10-core-cli (Lines 41–43) does attempt apt install first and falls back to manual. Consider documenting this as apt/manual (or equivalent) to match actual behavior.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/06-tool-inventory.md` at line 58, Update the zoxide row in
docs/06-tool-inventory.md so the Ubuntu install method reflects the actual
behavior in runs/10-core-cli: change the "manual" entry to "apt/manual" (or "apt
→ manual") to indicate it attempts apt install first and falls back to manual;
reference the table row containing "zoxide" and the workflow file
runs/10-core-cli for consistency.
…tup modules and update associated documentation
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/architecture.md`:
- Around line 24-32: The fenced code block in docs/architecture.md (the
directory layout block starting with "setup/") lacks a language specifier;
update the opening fence to include a language identifier (e.g., ```text or
```bash) so it matches README.md and satisfies markdown lint rules, ensuring the
block that lists "setup/", "lib/common", "runs/NN-name", "scripts/lint",
"tests/", and "docs/" is changed accordingly.
In `@docs/tool-inventory.md`:
- Line 32: Replace the incorrect lowercase "macos method (future)" header with
the proper Apple-branded capitalization "macOS method (future)" in the three
table headers where it appears; update each occurrence of the header text (exact
match "macos method (future)") to "macOS method (future)" in
docs/tool-inventory.md so all tables show the correct "macOS" capitalization.
- Around line 9-12: Remove or update the stale bullet "In which implementation
phase each item will be automated" in the docs/tool-inventory.md header so it
matches the current table structure (which no longer has automation/phase
columns); specifically edit the list of bullets at the top (the one containing
"What should exist on the machine", "How each item is installed", "How
installation is verified", and the stale "In which implementation phase each
item will be automated") to either delete that final bullet or replace it with a
bullet that reflects the current table columns.
In `@README.md`:
- Around line 31-39: The fenced code block in README.md showing the repository
tree is missing a language specifier; update the opening triple-backtick for
that block to include a plain text language (e.g., change ``` to ```text) so the
block becomes a labeled plaintext block and satisfies the linter without
altering the repository tree content (affecting the fenced code block around the
setup/ tree).
In `@runs/10-core-cli`:
- Around line 40-43: The zoxide branch currently only logs a warning when
has_cmd zoxide returns false; change it to attempt installation by calling
pkg_install zoxide and only emit log_warn if that installation fails (or if
pkg_install indicates apt is unavailable). Update the snippet around the has_cmd
check to call pkg_install "zoxide", check its exit/result, and call log_warn
"zoxide not available via apt — install manually" only on failure, using the
existing functions has_cmd, pkg_install, and log_warn to locate and modify the
logic.
🪄 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: 973a5cc8-8260-49b4-8317-4d8175d01f2b
📒 Files selected for processing (18)
README.mddocs/00-vision.mddocs/01-architecture.mddocs/02-operating-model.mddocs/03-implementation-plan.mddocs/04-testing-strategy.mddocs/05-platform-roadmap.mddocs/07-definition-of-done.mddocs/08-milestone-1-arch-mvp.mddocs/architecture.mddocs/contributing.mddocs/new-machine-setup.mddocs/tool-inventory.mdrunruns/10-core-cliruns/30-git-sshruns/80-dotfilestests/README.md
💤 Files with no reviewable changes (8)
- docs/07-definition-of-done.md
- docs/04-testing-strategy.md
- docs/05-platform-roadmap.md
- docs/02-operating-model.md
- docs/00-vision.md
- docs/03-implementation-plan.md
- docs/01-architecture.md
- docs/08-milestone-1-arch-mvp.md
✅ Files skipped from review due to trivial changes (2)
- run
- docs/new-machine-setup.md
🚧 Files skipped from review as they are similar to previous changes (2)
- tests/README.md
- runs/30-git-ssh
Summary by CodeRabbit
Documentation
New Features
Chores