[PR #8095] fix(nix): initialize hashes.json with per-system format #12623

Closed
opened 2026-02-16 18:17:31 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/8095

State: closed
Merged: Yes


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

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/8095 **State:** closed **Merged:** Yes --- Fixes a bug in the `update-hashes.sh` script introduced in PR #8033. ## Problem The script was initializing `hashes.json` with legacy string format: ```json {"nodeModules": "sha256-AAA..."} ``` But the `write_node_modules_hash` function expects per-system object format: ```json {"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
yindo added the pull-request label 2026-02-16 18:17:31 -05:00
yindo closed this issue 2026-02-16 18:17:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12623