Commit Graph
6 Commits
Author SHA1 Message Date
google-labs-jules[bot] 7bc85f1b99 feat: add load test script with safety guardrails
Implements `scripts/agent/load-test.mjs` to simulate N clients publishing
video and view events to a relay. Includes:
- Latency and throughput metrics.
- Signing time profiling.
- Safety guardrails to prevent accidental stress testing of public relays.
- A lightweight local relay (`scripts/agent/simple-relay.mjs`) for testing.

Outputs a report to `artifacts/load-report-YYYYMMDD.json`.
2026-01-18 19:24:01 +00:00
google-labs-jules[bot] 69e5a45af1 fix(ai): prevent race condition in login modal initialization (agent)
Removes a premature call to `initializeLoginModalController` in `ApplicationBootstrap` which was attempting to initialize the login modal before the DOM was fully hydrated, causing a "modal container not found" warning during startup. The modal is already correctly initialized later in `js/index.js` after markup loading completes.
2026-01-18 18:21:41 +00:00
google-labs-jules[bot] ec5fc23164 feat(fuzz): add input robustness testing harnesses and fixes
- Add fuzz testing scripts for `nostrEventSchemas.js`, `dmDecryptor.js`, and `magnetUtils.js` in `scripts/agent/`.
- Fix `build...` functions in `nostrEventSchemas.js` to handle `null`/`undefined` inputs.
- Fix `buildVideoPostEvent` to gracefully handle circular references in content serialization.
- Fix `normalizeAndAugmentMagnet` in `magnetUtils.js` to handle non-iterable `extraTrackers`.
- Include minimal reproducers for discovered crashes in `examples/reproducers/`.
2026-01-18 16:09:48 +00:00
google-labs-jules[bot] 82f92d420f feat(ai): add interop-test.mjs for Nostr protocol validation
Implements `scripts/agent/interop-test.mjs` to validate core Nostr operations
(Video Post, View Event, Encrypted DM) against a small set of public relays.
Ensures ephemeral keys are used and no private data is persisted.

Features:
- Ephemeral sender/receiver key generation.
- Polyfills for WebSocket, localStorage, and Crypto for Node.js environment.
- Verification of event signatures, IDs, and content shape.
- DM encryption/decryption roundtrip verification.
- Safe relay list usage (only 2 known relays).
2026-01-18 07:11:08 +00:00
google-labs-jules[bot] a8647c109f chore(ai): add smoke test script (agent)
Added `scripts/agent/smoke-test.mjs` to verify key application flows in a headless environment.

Features:
- Verifies Relay Connection
- Verifies NSEC Login (Ephemeral)
- Verifies Video Publishing (Sign & Send)
- Verifies Event Retrieval
- Verifies DM Encryption/Decryption

Usage:
```bash
npm install
node scripts/agent/smoke-test.mjs
```

Artifacts (logs/reports) are generated in `artifacts/` and are ignored by git.
Utilizes `scripts/agent/simple-relay.mjs` for a local relay.
Uses `jsdom` to polyfill browser environment for `NostrClient`.
2026-01-17 21:10:02 +00:00
google-labs-jules[bot] 898f3056a8 Add load testing scripts and report 2026-01-17 19:56:27 +00:00