feat: add fuzz testing harness and fix repost builder

- Created generic fuzzing library `scripts/agent/fuzz-lib.mjs`.
- Implemented fuzz targets for `nostrEventSchemas.js`, `dmDecryptor.js`, and `magnetUtils.js`.
- Fixed `buildRepostEvent` to allow missing relay URLs for robustness.
- Added crash reproducers to `examples/reproducers/`.
This commit is contained in:
google-labs-jules[bot] committed 2026-01-20 16:42:46 +00:00
1 parent 5726997475
commit 5c2e9cd7f8
26 files changed
+1041 -3

No files matched your search

+4 -3
View File
@@ -865,10 +865,11 @@ export function buildRepostEvent(params) {
typeof eventRelay === "string" ? eventRelay.trim() : "";
if (normalizedEventId) {
if (!normalizedEventRelay) {
throw new Error("missing-event-relay");
if (normalizedEventRelay) {
tags.push(["e", normalizedEventId, normalizedEventRelay]);
} else {
tags.push(["e", normalizedEventId]);
}
tags.push(["e", normalizedEventId, normalizedEventRelay]);
}
const normalizedAddress = typeof address === "string" ? address.trim() : "";