Skip to content

chore(deps): upgrade clawdbot to v2026.1.20 and add automatic pnpmDepsHash computation - #637

Merged
shunkakinoki merged 2 commits into
mainfrom
chore/clawdbot-v2026.1.20-auto-hash
Jan 21, 2026
Merged

chore(deps): upgrade clawdbot to v2026.1.20 and add automatic pnpmDepsHash computation#637
shunkakinoki merged 2 commits into
mainfrom
chore/clawdbot-v2026.1.20-auto-hash

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Jan 21, 2026

Copy link
Copy Markdown
Owner

Changes

  • Upgraded clawdbot overlay from v2026.1.16-2 to v2026.1.20
  • Updated all related hashes (source hash, pnpmDepsHash, app hash)
  • Added automatic pnpmDepsHash computation function to upgrade-overlays.sh
  • Added pnpm-hash command to update only pnpmDepsHash when needed
  • Improved upgrade script to automatically compute correct pnpmDepsHash

Technical Details

  • The new compute_pnpm_deps_hash() function runs a build attempt with a fake hash
  • Extracts the correct hash from the nix build error output
  • Automatically updates overlays/default.nix with the computed hash
  • Allows manual hash updates via ./scripts/upgrade-overlays.sh pnpm-hash

Testing

  • Manual testing of pnpmDepsHash computation function
  • Verified hash extraction from build error output
  • Tested new pnpm-hash command

Generated with opencode by claude-3.5-sonnet


Summary by cubic

Upgrades the clawdbot overlay to v2026.1.20 and automates pnpmDepsHash updates to prevent manual fixes after Nix build failures.

  • Dependencies

    • Updated clawdbot source and app to v2026.1.20 with new hashes.
    • Refreshed flake.lock (nix-clawdbot, nixpkgs, home-manager, etc.).
  • New Features

    • Added compute_pnpm_deps_hash() to auto-derive pnpmDepsHash from a build error.
    • Introduced pnpm-hash command to update only pnpmDepsHash.
    • upgrade-overlays.sh now auto-updates pnpmDepsHash during clawdbot upgrades.

Written for commit 0c4b0eb. Summary will update on new commits.

Copilot AI review requested due to automatic review settings January 21, 2026 11:42
@shunkakinoki
shunkakinoki enabled auto-merge (squash) January 21, 2026 11:42
@mesa-dot-dev

mesa-dot-dev Bot commented Jan 21, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@coderabbitai

coderabbitai Bot commented Jan 21, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Summary by CodeRabbit

  • Chores

    • Bumped package/app to 2026.1.20 and refreshed associated dependency hashes.
    • Improved upgrade tooling to automatically compute and update dependency hashes, reducing manual steps and adding clearer upgrade logs.
    • Added a dedicated command to refresh dependency hash values from the CLI.
  • Tests

    • Updated tests to reflect revised CLI usage/help and unknown-command output.

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

Walkthrough

Adds automated pnpmDepsHash computation and a pnpm-hash CLI command to the overlay upgrade script, and bumps clawdbot in overlays/default.nix from 2026.1.16-2 to 2026.1.20. Tests updated to reflect CLI output text changes.

Changes

Cohort / File(s) Summary
Overlay bump
overlays/default.nix
Bump clawdbot from 2026.1.16-2 to 2026.1.20: update source rev, hashes, app tarball URL/hash, and embedded clawdbotVersion.
Upgrade script
scripts/upgrade-overlays.sh
Add compute_pnpm_deps_hash() and update_pnpm_hash() to run a temporary nix build, extract pnpmDepsHash, and update the overlay. Integrate automatic pnpmDepsHash flow into clawdbot upgrade, add pnpm-hash CLI command, and update help/dispatch text.
Tests
spec/upgrade_overlays_spec.sh
Adjust expected help/unknown-command output strings to match updated messaging ("Available commands:" and "Unknown command: ...").

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant CLI as "upgrade-overlays.sh (CLI)"
  participant Script as "compute_pnpm_deps_hash/update_pnpm_hash"
  participant Nix as "nix build (temporary)"
  participant Overlay as "overlays/default.nix"

  User->>CLI: run `upgrade` or `pnpm-hash`
  CLI->>Script: invoke compute/update helper
  Script->>Overlay: write placeholder pnpmDepsHash
  Script->>Nix: run `nix build` for pnpm deps
  Nix-->>Script: error output contains real pnpmDepsHash
  Script->>Script: parse hash from error
  alt hash found
    Script->>Overlay: replace placeholder with real pnpmDepsHash
    Script-->>CLI: success
    CLI-->>User: report updated hash and upgrade result
  else hash not found
    Script-->>CLI: restore original hash
    CLI-->>User: warn manual verification required
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

dependencies, enhancement

Poem

I’m a rabbit with a terminal glow,
I chase the hashes fast and slow,
I build, I parse, I patch with cheer,
PNPM dreams now crystal clear —
Hoppity hops, the overlay’s near! 🐇✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: upgrading clawdbot to v2026.1.20 and adding automatic pnpmDepsHash computation, which are the core focuses of the changeset.
Description check ✅ Passed The description is directly related to the changeset, providing clear details about the clawdbot upgrade, hash updates, and new automation functions added to the upgrade script.

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

✨ 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 chore/clawdbot-v2026.1.20-auto-hash

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.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @shunkakinoki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the dependency management process for Nix-based projects. It upgrades the clawdbot overlay to its latest version and introduces significant automation for computing pnpmDepsHash. These changes aim to reduce manual effort and potential errors associated with maintaining correct dependency hashes, making the upgrade process more robust and user-friendly.

Highlights

  • Clawdbot Overlay Upgrade: The clawdbot overlay has been updated to version v2026.1.20, including updates to its source revision, source hash, and application hash.
  • Automated pnpmDepsHash Computation: A new compute_pnpm_deps_hash function has been added to scripts/upgrade-overlays.sh. This function automatically determines the correct pnpmDepsHash by attempting a Nix build with a fake hash and extracting the correct hash from the build error output.
  • New pnpm-hash Command: A dedicated pnpm-hash command has been introduced to scripts/upgrade-overlays.sh, allowing users to update only the pnpmDepsHash when necessary, streamlining dependency hash management.
  • Dependency Lock File Updates: The flake.lock file has been updated to reflect newer versions and hashes for several Nix dependencies, including devenv, home-manager, neovim-nightly-overlay, neovim-src, nix-clawdbot, nixpkgs_2, and NUR.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@mesa-dot-dev

mesa-dot-dev Bot commented Jan 21, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Upgraded the clawdbot overlay to v2026.1.20 and introduced automated pnpmDepsHash computation and updating to streamline dependency management.

What changed?

  • flake.lock: The Nix flake's dependencies were re-evaluated and updated to new versions.
  • overlays/default.nix: Updated to include the clawdbot overlay at v2026.1.20, and now automatically receives the computed pnpmDepsHash.
  • scripts/upgrade-overlays.sh: Enhanced with a compute_pnpm_deps_hash function to automatically derive the pnpmDepsHash from nix build error output. This automation is integrated into the upgrade_clawdbot function. A new pnpm-hash command and update_pnpm_hash function were added to allow for independent updates of only the pnpmDepsHash. Usage instructions and error messages were also updated.

Description generated by Mesa. Update settings

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully upgrades the clawdbot overlay to v2026.1.20 and introduces significant automation for pnpmDepsHash computation. The changes to flake.lock and overlays/default.nix reflect the updated dependency versions and hashes. The new compute_pnpm_deps_hash function and its integration into the upgrade script will greatly improve the maintainability of the Nix configuration by reducing the need for manual hash updates after build failures. The addition of a dedicated pnpm-hash command is also a valuable improvement for targeted updates.


# Run nix build and capture the correct hash from error output
local build_output correct_hash
build_output=$(nix build ".#darwinConfigurations.aarch64-darwin.system" --no-link 2>&1 || true)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The nix build command explicitly targets . #darwinConfigurations.aarch64-darwin.system. This hardcoded path makes the compute_pnpm_deps_hash function specific to aarch64-darwin systems. If this script is intended to be run on other architectures (e.g., x86_64-linux or aarch64-linux as defined in flake.nix), this command will likely fail or produce an irrelevant hash. Consider making the build target dynamic based on the current system or an argument, or add a check to ensure it's run on the correct architecture.

Comment on lines +190 to +195
if compute_pnpm_deps_hash; then
log_info "✅ clawdbot upgraded from $current_version to $version"
else
log_info "✅ clawdbot upgraded from $current_version to $version"
log_warn "⚠️ pnpmDepsHash may need manual verification"
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The success message "✅ clawdbot upgraded..." is printed twice, once inside the if block and once inside the else block. If compute_pnpm_deps_hash fails, the script still indicates a successful upgrade, which can be misleading. It would be better to print the success message only when the full upgrade, including hash computation, is successful. If compute_pnpm_deps_hash fails, a more distinct warning or error should be shown instead of a success message.

Suggested change
if compute_pnpm_deps_hash; then
log_info "✅ clawdbot upgraded from $current_version to $version"
else
log_info "✅ clawdbot upgraded from $current_version to $version"
log_warn "⚠️ pnpmDepsHash may need manual verification"
fi
# Update pnpmDepsHash automatically
if compute_pnpm_deps_hash; then
log_info "✅ clawdbot upgraded from $current_version to $version"
else
log_warn "⚠️ clawdbot upgraded from $current_version to $version, but pnpmDepsHash may need manual verification"
fi

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@scripts/upgrade-overlays.sh`:
- Around line 86-113: The compute_pnpm_deps_hash function is currently using
global grep/sed patterns that will change every pnpmDepsHash in the overlay
file; update it to first extract the clawdbotSourceOverride block (e.g., locate
the block start/end markers for "clawdbotSourceOverride"), read the current
pnpmDepsHash only from that block (replace the current_hash extraction that uses
grep on the whole file), perform the temporary fake-hash insertion and the final
sed replacement scoped to that block (instead of global substitutions used in
the sed_inplace calls), and if the clawdbotSourceOverride block or its
pnpmDepsHash key is not found, fail with a clear error rather than proceeding
(so the function returns non-zero). Ensure you reference compute_pnpm_deps_hash,
current_hash, build_output/correct_hash and the sed_inplace usages when making
these changes.

Comment on lines +86 to +113
compute_pnpm_deps_hash() {
local fake_hash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
local current_hash

# Get current pnpmDepsHash
current_hash=$(grep 'pnpmDepsHash = "' "$OVERLAY_FILE" | head -1 | sed 's/.*pnpmDepsHash = "\([^"]*\)".*/\1/')

echo " Computing pnpmDepsHash (this requires a build attempt)..."

# Temporarily set fake hash
sed_inplace "s|pnpmDepsHash = \"[^\"]*\";|pnpmDepsHash = \"$fake_hash\";|" "$OVERLAY_FILE"

# Run nix build and capture the correct hash from error output
local build_output correct_hash
build_output=$(nix build ".#darwinConfigurations.aarch64-darwin.system" --no-link 2>&1 || true)

# Extract the correct hash from "got: sha256-..." line
correct_hash=$(echo "$build_output" | grep -o 'got:[[:space:]]*sha256-[A-Za-z0-9+/=]*' | head -1 | sed 's/got:[[:space:]]*//')

if [ -n "$correct_hash" ]; then
echo " pnpmDepsHash: $correct_hash"
sed_inplace "s|pnpmDepsHash = \"[^\"]*\";|pnpmDepsHash = \"$correct_hash\";|" "$OVERLAY_FILE"
return 0
else
# Restore original hash if we couldn't get a new one
log_warn " Could not determine pnpmDepsHash, restoring original"
sed_inplace "s|pnpmDepsHash = \"[^\"]*\";|pnpmDepsHash = \"$current_hash\";|" "$OVERLAY_FILE"
return 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Scope pnpmDepsHash updates to clawdbotSourceOverride only.

Line 91 and Lines 96–112 use global grep/sed patterns that will update every pnpmDepsHash in overlays/default.nix. If other overlays add a pnpmDepsHash, this silently corrupts them. Also, with set -euo pipefail, a missing match will abort the script. Prefer scoping the read/write to the clawdbotSourceOverride block and explicitly error if the hash isn’t found.

🛠️ Proposed fix (scoped read/write + guard)
-  current_hash=$(grep 'pnpmDepsHash = "' "$OVERLAY_FILE" | head -1 | sed 's/.*pnpmDepsHash = "\([^"]*\)".*/\1/')
+  current_hash=$(awk '
+    /clawdbotSourceOverride = \{/ { in_src=1 }
+    in_src && /pnpmDepsHash = "/ {
+      match($0, /pnpmDepsHash = "([^"]+)"/, m)
+      print m[1]
+      exit
+    }
+    in_src && /\}/ { in_src=0 }
+  ' "$OVERLAY_FILE")
+  if [ -z "$current_hash" ]; then
+    log_error "  pnpmDepsHash not found in clawdbotSourceOverride"
+    return 1
+  fi
@@
-  sed_inplace "s|pnpmDepsHash = \"[^\"]*\";|pnpmDepsHash = \"$fake_hash\";|" "$OVERLAY_FILE"
+  awk -v new_hash="$fake_hash" '
+    /clawdbotSourceOverride = \{/ { in_src=1 }
+    in_src && /pnpmDepsHash = "sha256-/ {
+      sub(/pnpmDepsHash = "[^"]*"/, "pnpmDepsHash = \"" new_hash "\"")
+      in_src=0
+    }
+    { print }
+  ' "$OVERLAY_FILE" >"$OVERLAY_FILE.tmp" && mv "$OVERLAY_FILE.tmp" "$OVERLAY_FILE"
@@
-    sed_inplace "s|pnpmDepsHash = \"[^\"]*\";|pnpmDepsHash = \"$correct_hash\";|" "$OVERLAY_FILE"
+    awk -v new_hash="$correct_hash" '
+      /clawdbotSourceOverride = \{/ { in_src=1 }
+      in_src && /pnpmDepsHash = "sha256-/ {
+        sub(/pnpmDepsHash = "[^"]*"/, "pnpmDepsHash = \"" new_hash "\"")
+        in_src=0
+      }
+      { print }
+    ' "$OVERLAY_FILE" >"$OVERLAY_FILE.tmp" && mv "$OVERLAY_FILE.tmp" "$OVERLAY_FILE"
@@
-    sed_inplace "s|pnpmDepsHash = \"[^\"]*\";|pnpmDepsHash = \"$current_hash\";|" "$OVERLAY_FILE"
+    awk -v new_hash="$current_hash" '
+      /clawdbotSourceOverride = \{/ { in_src=1 }
+      in_src && /pnpmDepsHash = "sha256-/ {
+        sub(/pnpmDepsHash = "[^"]*"/, "pnpmDepsHash = \"" new_hash "\"")
+        in_src=0
+      }
+      { print }
+    ' "$OVERLAY_FILE" >"$OVERLAY_FILE.tmp" && mv "$OVERLAY_FILE.tmp" "$OVERLAY_FILE"
🤖 Prompt for AI Agents
In `@scripts/upgrade-overlays.sh` around lines 86 - 113, The
compute_pnpm_deps_hash function is currently using global grep/sed patterns that
will change every pnpmDepsHash in the overlay file; update it to first extract
the clawdbotSourceOverride block (e.g., locate the block start/end markers for
"clawdbotSourceOverride"), read the current pnpmDepsHash only from that block
(replace the current_hash extraction that uses grep on the whole file), perform
the temporary fake-hash insertion and the final sed replacement scoped to that
block (instead of global substitutions used in the sed_inplace calls), and if
the clawdbotSourceOverride block or its pnpmDepsHash key is not found, fail with
a clear error rather than proceeding (so the function returns non-zero). Ensure
you reference compute_pnpm_deps_hash, current_hash, build_output/correct_hash
and the sed_inplace usages when making these changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the clawdbot dependency from v2026.1.16-2 to v2026.1.20 and introduces automatic pnpmDepsHash computation functionality to streamline future upgrades.

Changes:

  • Upgraded clawdbot overlay to v2026.1.20 with updated source, app, and pnpmDepsHash values
  • Added compute_pnpm_deps_hash() function that automatically determines the correct pnpmDepsHash by running a build attempt with a fake hash and extracting the correct value from error output
  • Added new pnpm-hash command to allow manual pnpmDepsHash updates independently of version upgrades

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 7 comments.

File Description
scripts/upgrade-overlays.sh Added compute_pnpm_deps_hash() function, update_pnpm_hash() function, integrated automatic hash computation into upgrade flow, and added pnpm-hash command
overlays/default.nix Updated clawdbot from v2026.1.16-2 to v2026.1.20 with corresponding hash updates (rev, source hash, pnpmDepsHash, app hash)
flake.lock Standard dependency updates for devenv, home-manager, neovim-nightly-overlay, nix-clawdbot, nixpkgs, and NUR inputs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -83,6 +83,37 @@ sed_inplace() {
fi
}

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compute_pnpm_deps_hash function lacks a comment or docstring explaining its purpose, how it works, and what it returns. Consider adding a header comment similar to other utility functions in the file to improve code documentation and maintainability.

Suggested change
# Compute the correct pnpmDepsHash for the overlay.
# This temporarily writes a fake pnpmDepsHash into $OVERLAY_FILE, runs a Nix
# build to trigger a hash mismatch, extracts the expected hash from the build
# error output, and then replaces the fake value with the correct hash.
# On success, updates pnpmDepsHash in the overlay file and returns 0.
# If the correct hash cannot be determined, restores the original value and
# returns 1.

Copilot uses AI. Check for mistakes.
Comment on lines +109 to +112
else
# Restore original hash if we couldn't get a new one
log_warn " Could not determine pnpmDepsHash, restoring original"
sed_inplace "s|pnpmDepsHash = \"[^\"]*\";|pnpmDepsHash = \"$current_hash\";|" "$OVERLAY_FILE"

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function assumes that if no hash is extracted from the build output, it should restore the original hash. However, this doesn't distinguish between a legitimate hash mismatch error and other types of build failures (e.g., network issues, syntax errors, missing dependencies). Consider adding validation to check if the build output contains a hash mismatch error before assuming the extraction failed, to provide more helpful error messages to users.

Copilot uses AI. Check for mistakes.
Comment on lines +86 to +115
compute_pnpm_deps_hash() {
local fake_hash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
local current_hash

# Get current pnpmDepsHash
current_hash=$(grep 'pnpmDepsHash = "' "$OVERLAY_FILE" | head -1 | sed 's/.*pnpmDepsHash = "\([^"]*\)".*/\1/')

echo " Computing pnpmDepsHash (this requires a build attempt)..."

# Temporarily set fake hash
sed_inplace "s|pnpmDepsHash = \"[^\"]*\";|pnpmDepsHash = \"$fake_hash\";|" "$OVERLAY_FILE"

# Run nix build and capture the correct hash from error output
local build_output correct_hash
build_output=$(nix build ".#darwinConfigurations.aarch64-darwin.system" --no-link 2>&1 || true)

# Extract the correct hash from "got: sha256-..." line
correct_hash=$(echo "$build_output" | grep -o 'got:[[:space:]]*sha256-[A-Za-z0-9+/=]*' | head -1 | sed 's/got:[[:space:]]*//')

if [ -n "$correct_hash" ]; then
echo " pnpmDepsHash: $correct_hash"
sed_inplace "s|pnpmDepsHash = \"[^\"]*\";|pnpmDepsHash = \"$correct_hash\";|" "$OVERLAY_FILE"
return 0
else
# Restore original hash if we couldn't get a new one
log_warn " Could not determine pnpmDepsHash, restoring original"
sed_inplace "s|pnpmDepsHash = \"[^\"]*\";|pnpmDepsHash = \"$current_hash\";|" "$OVERLAY_FILE"
return 1
fi
}

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the sed_inplace operation fails when setting the fake hash or restoring the original hash (lines 96, 107, or 112), the function will continue execution due to the 'set -euo pipefail' at the script level. However, a failure during hash restoration could leave the overlay file in an inconsistent state. Consider adding error checking after critical sed_inplace operations or wrapping the function in a trap to ensure the original hash is restored even if the function fails unexpectedly.

Copilot uses AI. Check for mistakes.
;;
*)
log_error "Unknown overlay: $target"
log_error "Unknown command: $target"

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message was changed from "Unknown overlay:" to "Unknown command:", but the corresponding test in spec/upgrade_overlays_spec.sh (line 45) expects "Unknown overlay: unknown-overlay". This change will cause existing tests to fail. The tests should be updated to match this change in error messaging.

Copilot uses AI. Check for mistakes.

# Run nix build and capture the correct hash from error output
local build_output correct_hash
build_output=$(nix build ".#darwinConfigurations.aarch64-darwin.system" --no-link 2>&1 || true)

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build command is hardcoded to build specifically for aarch64-darwin, which may fail on non-aarch64-darwin systems. Consider detecting the system architecture or making the target configurable to support both aarch64-darwin and x86_64-darwin systems.

Copilot uses AI. Check for mistakes.
Comment on lines +191 to +196
log_info "✅ clawdbot upgraded from $current_version to $version"
else
log_info "✅ clawdbot upgraded from $current_version to $version"
log_warn "⚠️ pnpmDepsHash may need manual verification"
fi

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The success message is displayed in both the if and else branches, making the conditional logic redundant. The only difference is the warning message in the else branch. Consider restructuring this to avoid the duplicate log_info call, such as displaying the success message once after the conditional, or making the messages more distinct.

Suggested change
log_info "✅ clawdbot upgraded from $current_version to $version"
else
log_info "✅ clawdbot upgraded from $current_version to $version"
log_warn "⚠️ pnpmDepsHash may need manual verification"
fi
:
else
log_warn "⚠️ pnpmDepsHash may need manual verification"
fi
log_info "✅ clawdbot upgraded from $current_version to $version"

Copilot uses AI. Check for mistakes.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

@shunkakinoki

Copy link
Copy Markdown
Owner Author

@claude fix shell-test

@shunkakinoki
shunkakinoki disabled auto-merge January 21, 2026 12:45
@shunkakinoki
shunkakinoki merged commit b878ac5 into main Jan 21, 2026
20 checks passed
@shunkakinoki
shunkakinoki deleted the chore/clawdbot-v2026.1.20-auto-hash branch January 21, 2026 12:46

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

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