Commit Graph
14 Commits
Author SHA1 Message Date
thePR0M3TH3AN dc4d501a6b Merge pull request #1374 from PR0M3TH3AN/ai/interop-tests-20260119-1042596527916415444
Add interop-test.mjs for Nostr protocol verification
2026-01-19 09:21:42 -05:00
thePR0M3TH3AN e96a8ff5c6 Merge pull request #1373 from PR0M3TH3AN/telemetry-and-aggregation-5517299699870716397
Add privacy-preserving telemetry and error aggregation script
2026-01-19 09:21:17 -05:00
google-labs-jules[bot] 9d97d8dcf8 feat(agent): add interop-test.mjs for Nostr protocol verification
- Implements `scripts/agent/interop-test.mjs` using Playwright to run integration tests in a browser context.
- Tests include:
  - Publishing `VIDEO_POST` (Kind 30078) events using schema builders.
  - Verifying event roundtrip (fetch by ID).
  - Publishing `VIEW_EVENT` (Watch History).
  - Sending and decrypting Encrypted DMs (NIP-04/NIP-44) using ephemeral keys.
- Uses local `simple-relay.mjs` (port 8008) and Python HTTP server (port 8001) to ensure environment isolation.
- Generates artifacts in `artifacts/` folder including logs and reports.
2026-01-19 07:30:44 +00:00
google-labs-jules[bot] 980075981a feat: add privacy-preserving telemetry and error aggregation script
- Added `scripts/agent/telemetry.mjs` to aggregate errors from log files (test_output.log, etc.).
- Implemented robust PII sanitization (IPv4, emails, hex keys, Bech32 keys, and file paths).
- Script generates a JSON artifact (`artifacts/error-aggregates.json`) and a Markdown report (`ai/reports/telemetry-YYYYMMDD.md`).
- Aggregation groups errors by sanitized message/stack trace fingerprint.
2026-01-19 06:20:13 +00:00
google-labs-jules[bot] 4d2bb8bf3d chore(ai): event schema validation tool + fixes
- Added `scripts/agent/validate-events.mjs` to validate event builders against schemas.
- Fixed `NOTE_TYPES.REPOST` schema content format (json instead of empty).
- Added `NOTE_TYPES.MUTE_LIST` and `buildMuteListEvent`.
- Added `buildProfileMetadataEvent` to standardise Kind 0 creation.
- Updated `js/ui/profileModalController.js` to use `buildProfileMetadataEvent`.
- Updated `js/userBlocks.js` to use `buildMuteListEvent` for publishing mute list snapshots.
- Updated `docs/nostr-event-schemas.md` with new schemas and builders.
2026-01-19 05:47:37 +00:00
thePR0M3TH3AN f443d9e37b Merge pull request #1342 from PR0M3TH3AN/ai/pr-review-script-8211622282214649456
Add automated PR review script
2026-01-18 20:45:54 -05:00
google-labs-jules[bot] d279963d2f feat(agent): add automated PR review script 2026-01-18 23:35:53 +00:00
google-labs-jules[bot] 74c5bac4e0 chore(ai): add smoke test script (agent) 2026-01-18 21:35:07 +00:00
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