Skip to content

Conversation

@jerome-benoit
Copy link
Contributor

Fixes a bug in the update-hashes.sh script introduced in PR #8033.

Problem

The script was initializing hashes.json with legacy string format:

{"nodeModules": "sha256-AAA..."}

But the write_node_modules_hash function expects per-system object format:

{"nodeModules": {}}

This caused the update-nix-hashes workflow to fail when trying to write system-specific hashes.

Solution

  1. Initialize with empty object {} instead of dummy string
  2. Fix validation check to match per-system format

Changes

  • nix/scripts/update-hashes.sh line 13: Change init from string to object
  • nix/scripts/update-hashes.sh line 114: Update validation to check per-system hash

Related: #8029, #8033

Copilot AI review requested due to automatic review settings January 12, 2026 23:56
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

Copy link
Contributor

Copilot AI left a comment

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 fixes a bug in the update-hashes.sh script where the initialization of hashes.json was using a legacy string format instead of the per-system object format, causing the update-nix-hashes workflow to fail.

Changes:

  • Initialize nodeModules with empty object {} instead of dummy string value
  • Update validation check to verify per-system hash format using $system key

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

@jerome-benoit
Copy link
Contributor Author

@rekram1-node: follow up fix for #8029, #8033

@rekram1-node rekram1-node merged commit d839f70 into anomalyco:dev Jan 13, 2026
5 checks passed
@jerome-benoit jerome-benoit deleted the fix/nix-hash-script-init branch January 13, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants