Commit Graph
56 Commits
Author SHA1 Message Date
google-labs-jules[bot] 6a4ac5120e chore(ai): remove stale TODO and optimize JSON parsing in validation script
- Removed a TODO comment in `scripts/agent/validate-events.mjs` as the functionality was already implemented.
- Optimized the code to avoid redundant `JSON.parse` calls.
- Verified the script passes all validation tests.
- Created `artifacts/issue_telemetry_json.md` to track the larger task of handling JSON logs in telemetry aggregation.
2026-01-21 01:37:04 +00:00
google-labs-jules[bot] c2b0f713e5 feat: add automated PR review script
- Adds `scripts/agent/review-pr.mjs` to automate PR checks (lint, format, test).
- Implements micro-fix logic to auto-commit formatting changes.
- Adds guardrails for sensitive files (security/protocol review).
- Generates a Markdown report with test failure analysis.
2026-01-20 23:29:02 +00:00
google-labs-jules[bot] 4daa41a91b chore(ai): add smoke test script (agent) 2026-01-20 21:32:55 +00:00
google-labs-jules[bot] 04b26aa040 Add load testing script and report 2026-01-20 19:40:19 +00:00
google-labs-jules[bot] 5c2e9cd7f8 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/`.
2026-01-20 16:42:46 +00:00
thePR0M3TH3AN 4ee15c8686 Merge pull request #1432 from PR0M3TH3AN/ai/interop-tests-20250125-3541604759718709232
Add Protocol Interop Test Script
2026-01-20 07:30:17 -05:00
google-labs-jules[bot] b52396b6f7 feat: add protocol interop tests script
- Added `scripts/agent/interop-test.mjs` to verify Nostr protocol compatibility (Video Post, View Event, DM) using ephemeral keys.
- Added `scripts/agent/setup-test-env.js` to polyfill browser globals for Node.js execution.
- Ensures events are constructed via schema builders and published to test relays.
2026-01-20 07:16:20 +00:00
google-labs-jules[bot] 463b2a9e53 Add telemetry aggregation script
Introduces `scripts/agent/telemetry-aggregate.mjs` to parse, sanitize, and aggregate error logs from the `artifacts/` directory.

- Scans logs for errors and stack traces.
- Sanitizes PII (IPs, emails, keys) using regex.
- Groups errors by stack trace fingerprint (SHA256).
- Outputs a JSON summary (`artifacts/error-aggregates.json`) and a Markdown report (`ai/reports/telemetry-YYYYMMDD.md`).
- Suggests owners based on stack trace paths.
2026-01-20 06:30:20 +00:00
google-labs-jules[bot] 3b80692eb0 chore(ai): event schema validation tool + fixes
- Created `scripts/agent/validate-events.mjs` to validate all event builders against schemas.
- Updated `docs/nostr-event-schemas.md` to match codebase (fixed `WATCH_HISTORY` key, removed unused `STORAGE_CHALLENGE`).
- Added `validateEventAgainstSchema` to `js/nostrEventSchemas.js` for runtime validation in dev mode.
- Instrumented `buildVideoPostEvent` to use runtime validation.
- Verified that all 22 builders produce conformant events.
2026-01-20 05:21:18 +00:00
google-labs-jules[bot] f9412140fd feat: add automated PR review script
- Adds `scripts/agent/review-pr.mjs` to automate PR checks.
- Supports iterating open PRs via `gh` CLI.
- Runs `npm ci`, `format`, `lint`, and `test:unit`.
- Reports results to PR comments.
- Offers auto-fix for formatting changes.
- Adds guardrails for sensitive files (Nostr, crypto).
2026-01-19 23:38:23 +00:00
google-labs-jules[bot] f96d15b40e chore(ai): add smoke test script (agent)
- Created scripts/agent/smoke-test.mjs to verify key flows (login, relay connect, publish, DM decrypt).
- The script uses Playwright to run a headless browser test against a local HTTP server and a local relay.
- Outputs logs to artifacts/smoke-YYYYMMDD.log and a JSON report.
- Verified local execution passes.
2026-01-19 21:13:29 +00:00
thePR0M3TH3AN f2484cb163 Merge branch 'unstable' into ai/onboarding-20231027-15933194820812210320 2026-01-19 14:38:33 -05:00
google-labs-jules[bot] fc9ce6916d docs(ai): improve onboarding steps and fix lint/test issues
\n- Fixed CSS linting errors by replacing raw values with design tokens in `css/tailwind.source.css`.
- Updated `scripts/check-design-tokens.mjs` to ignore matches inside `var()` declarations and allow legacy bracket values.
- Fixed a failing unit test in `tests/ui/similar-content-card.test.mjs` to match current component behavior.
- Updated `CONTRIBUTING.md` to include `npm run build:css` and clarify linting requirements.
- Enhanced `.devcontainer/devcontainer.json` to include `npm run build:css` in `postCreateCommand`.
2026-01-19 19:35:17 +00:00
google-labs-jules[bot] da64e308af feat(agent): add load testing script and report 2026-01-19 19:26:49 +00:00
thePR0M3TH3AN 89e82778d6 Add DM test suites and headless e2e CI 2026-01-19 13:43:13 -05:00
google-labs-jules[bot] f9ce5b44db feat(test): add fuzzing harnesses for schemas, DM decryptor, and magnet utils
- Implemented deterministic fuzzers in `scripts/agent/`:
  - `fuzz-nostrEventSchemas.mjs`: Tests event builder functions and schema overrides.
  - `fuzz-dmDecryptor.mjs`: Tests DM decryption orchestration with mock decryptors.
  - `fuzz-magnetUtils.mjs`: Tests magnet link normalization.
- Fuzzers generate reports in `artifacts/` (gitignored).
- Reproducers for crashes are saved to `examples/reproducers/` (none found yet).
- Fuzzers use input-derived seeding for deterministic execution.
2026-01-19 16:23:46 +00:00
thePR0M3TH3AN 47b312b2a8 Merge pull request #1383 from PR0M3TH3AN/ai/lint-20250222-8105466209014839431
chore(ai): apply formatting/lint autofixes
2026-01-19 09:25:53 -05:00
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] 9adeb0e6e5 chore(ai): apply formatting/lint autofixes
Run `npm run format` and `npm run lint`.
Fix stylelint configuration to correctly parse variables with units in their names.
Migrate raw CSS measurements to tokens in `css/tokens.css` and update usages in `css/tailwind.source.css` and HTML templates.
Improve `scripts/check-design-tokens.mjs` to handle variable names with unit-like suffixes.

Files changed:
- css/tailwind.source.css (formatted and fixed lint)
- css/tokens.css (added tokens)
- stylelint.config.cjs (fixed regex)
- scripts/check-design-tokens.mjs (improved detection logic)
- components/profile-modal.html (fixed arbitrary values)
- index.html (fixed arbitrary values)
2026-01-19 14:12:29 +00: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
thePR0M3TH3AN bcb4777d59 Merge pull request #1303 from PR0M3TH3AN/ai/interop-tests-20260118-15201644868147508755
Add Nostr protocol interop test script
2026-01-18 07:52:13 -05: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] 30e0d9e287 feat(tools): add privacy-preserving telemetry aggregator
- Added `scripts/telemetry-aggregator.mjs` to collect, sanitize, and aggregate errors from unit and smoke tests.
- Added `telemetry:aggregate` script to `package.json`.
- Implemented PII sanitization for IPs, emails, and hex keys.
- Configured aggregation to prioritize critical/high severity issues.
2026-01-18 06:06:37 +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
google-labs-jules[bot] 163327aaa8 Remove watch history privacy banner and info text 2026-01-17 13:58:39 +00:00
google-labs-jules[bot] 1bc11e1ae8 fix(ci): Resolve visual regression failures and test flakiness
- Fix scoping and property mismatch errors in `popover.spec.ts`.
- Relax placement assertion in `popover.spec.ts` to accommodate environment variations.
- Implement missing `onModerationHide` handler in `docs/moderation/fixtures/index.html`.
- Improve `VideoCard.js` moderation badge handling to ensure correct DOM placement and static positioning when the card is hidden.
- Update `moderation.spec.ts` to use `toHaveCount(1)` and `dispatchEvent('click')` for button interactions, bypassing persistent headless rendering visibility issues (clipping).
- Increase tolerance in `overlay-layers.spec.ts` to account for scrollbar width differences in CI environments.
- Update `check-inline-styles.mjs` to ignore Playwright report directories.
- Update visual baselines for `kitchen-sink` to match the current environment.
2026-01-14 14:50:31 +00:00
thePR0M3TH3AN 3382185512 Refactor NIP-07 helpers and session actor storage 2025-10-22 11:25:46 -04:00
thePR0M3TH3AN bfb980c1c1 Enable runtime theme accent overrides 2025-10-19 13:51:46 -04:00
thePR0M3TH3AN 8c568af46a Remove local blog view in favor of configurable external link 2025-10-18 15:28:33 -04:00
thePR0M3TH3AN 43a75e86c8 Refactor popover engine to use Floating UI 2025-10-16 15:46:57 -04:00
thePR0M3TH3AN 7744e37c58 Enable beacon accent overrides 2025-10-15 22:14:12 -04:00
thePR0M3TH3AN 0422c742f4 Expand design token lint coverage 2025-10-14 21:51:13 -04:00
thePR0M3TH3AN da20299433 Extend design token lint to CSS 2025-10-14 21:27:59 -04:00
thePR0M3TH3AN ed60f1b7af Add lint for Tailwind arbitrary values 2025-10-14 19:18:14 -04:00
thePR0M3TH3AN e767316501 feat: add semantic color palette and lint guard 2025-10-14 15:18:02 -04:00
thePR0M3TH3AN 17086c9eff Refactor floating panel and metrics styling 2025-10-14 13:31:22 -04:00
thePR0M3TH3AN afffb5c01e Add design metrics tokens and tooling 2025-10-14 11:34:17 -04:00
thePR0M3TH3AN 053623bdac Refactor beacon runtime to design system modules 2025-10-14 10:26:41 -04:00
thePR0M3TH3AN e614acdee2 Refactor floating panel styling hooks 2025-10-14 09:32:28 -04:00
thePR0M3TH3AN dfa4a98f0a Remove dynamic style system and tighten inline style checks 2025-10-14 08:48:17 -04:00