Commit a490e37
authored
fix(release): sign updater compatibility metadata without a trailing newline (#40)
## Summary
**Category:** fix
**User Impact:** Future desktop releases can be installed from older
Berd versions without a false compatibility-signature failure.
**Problem:** The release script signed compact compatibility JSON with a
trailing newline, while the updater verifies the same JSON serialized
without that newline. The one-byte mismatch caused valid release
metadata to fail closed during update checks.
**Solution:** Emit raw compact JSON with `jq -cjn` so the producer signs
the updater's canonical bytes, and cover the exact payload passed to the
signer with a regression test.
<details>
<summary>File changes</summary>
**scripts/release/sign-compatibility-descriptor.sh**
Emit the compatibility descriptor without a trailing newline so its
signed bytes match updater verification.
**scripts/release/tests/release-scripts.test.mjs**
Capture the signer's input and assert it is the exact compact,
newline-free canonical payload expected by the updater.
</details>
### Related issue
None found.
### Testing
- `pnpm test:release-scripts`
- `just ci`1 parent 6c71c55 commit a490e37
2 files changed
Lines changed: 54 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
976 | 976 | | |
977 | 977 | | |
978 | 978 | | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
979 | 1032 | | |
980 | 1033 | | |
981 | 1034 | | |
| |||
0 commit comments