Commit Graph
123 Commits
Author SHA1 Message Date
google-labs-jules[bot] 25b513b094 chore(ai): add smoke test script (agent)
This commit ensures the existence and correctness of `scripts/agent/smoke-test.mjs`, a Playwright-based regression test suite.

The script:
- Starts a local web server (npx serve) and a local relay (simple-relay.mjs).
- Launches a headless browser to interact with the application.
- Verifies key flows:
  - Ephemeral login.
  - Video publishing (Kind 30078).
  - Direct Message (DM) sending and decryption (Kind 4/1059).
- Generates execution logs and summaries in `artifacts/`.

Also ensures `scripts/agent/simple-relay.mjs` is present as a dependency.
2026-01-24 21:12:02 +00:00
google-labs-jules[bot] 4a0b81ad98 chore(ai): remove dead code (unused exports & deps) 2026-01-24 20:28:53 +00:00
thePR0M3TH3AN 3bfe8d664f Merge pull request #1640 from PR0M3TH3AN/ai/load-test-20260124-3194345285315307704
Add Load Testing Scripts
2026-01-24 14:37:08 -05:00
thePR0M3TH3AN 37f5083947 Merge branch 'unstable' into ai/debug-frontend-20260124-13275558127831455913 2026-01-24 14:36:28 -05:00
thePR0M3TH3AN a639887a2d Merge pull request #1636 from PR0M3TH3AN/ai/fuzz-nostrEventSchemas-20241026-8251034504942230718
Fuzz Testing Infrastructure & Crash Fix
2026-01-24 14:35:59 -05:00
google-labs-jules[bot] 02fd8a54c0 Add load testing scripts for relay stress testing 2026-01-24 19:33:48 +00:00
thePR0M3TH3AN ca05082889 Merge pull request #1626 from PR0M3TH3AN/ai/interop-tests-20250222-11826880254938891668
Add Nostr Protocol Interoperability Tests
2026-01-24 14:31:34 -05:00
thePR0M3TH3AN 3e76b6f5a5 Merge pull request #1625 from PR0M3TH3AN/telemetry-aggregation-script-7372436822110581639
Add privacy-preserving telemetry aggregation script
2026-01-24 14:31:01 -05:00
thePR0M3TH3AN 934a1d7a41 Merge pull request #1624 from PR0M3TH3AN/ai/schema-validate-latest-5595774537431140337
chore(ai): event schema validation tool + fixes
2026-01-24 14:29:07 -05:00
thePR0M3TH3AN 6febe85156 Merge pull request #1616 from PR0M3TH3AN/enhance-pr-review-script-5884609440067038034
Enhance Automated PR Review Script
2026-01-24 13:56:05 -05:00
google-labs-jules[bot] f2ab7302ab fix(ai): frontend console error — double load and lint fixes (agent) 2026-01-24 18:29:26 +00:00
google-labs-jules[bot] 241ad32dc4 feat: add fuzz testing infrastructure and fix nostrEventSchemas crash
- Added `scripts/agent/fuzz-schemas.mjs`, `fuzz-dm.mjs`, `fuzz-magnet.mjs` and `fuzz-setup.mjs`.
- Fixed crash in `js/nostrEventSchemas.js` (buildAdminListEvent log and getNostrEventSchema type check).
- Added crash reproducers in `examples/reproducers/`.
- Fuzzers output reports to `artifacts/`.
- Updated fuzzers to deduplicate crashes and safely stringify inputs.
2026-01-24 16:46:46 +00:00
google-labs-jules[bot] 4c235b4ace feat: add interoperability test script for Nostr protocol verification
- Adds `scripts/agent/interop-test.mjs` to verify Video Post, View Event, and DM publishing/retrieval.
- Uses public relays (damus, nos.lol, snort) and ephemeral keys.
- Polyfills WebSocket and mocks localStorage for Node.js environment.
2026-01-24 07:38:35 +00:00
google-labs-jules[bot] c9201c777e Add privacy-preserving telemetry aggregation script
Moves and enhances the telemetry aggregator script to `scripts/agent/telemetry-aggregator.mjs`.
Updates `package.json` to point to the new location.
Implements robust parsing for smoke test summaries and fuzz reports.
Adds PII sanitization (IPs, emails, keys, paths).
Enforces opt-in via `ENABLE_TELEMETRY` environment variable.
Adds `ai/reports/` to `.gitignore`.
2026-01-24 06:29:10 +00:00
google-labs-jules[bot] 6884d06192 chore(ai): event schema validation tool + fixes
- Added `scripts/agent/validate-events.mjs` for builder validation.
- Enhanced `js/nostrEventSchemas.js` with `validateEventStructure`.
- Fixed `safeStringify` to handle objects correctly.
- Added `NOTE_TYPES.HTTP_AUTH` and `NOTE_TYPES.REPORT` with builders.
- Refactored `js/userBlocks.js`, `js/auth/signingAdapter.js`, `js/services/moderationService.js` to use builders.
- Updated `tests/user-blocks.test.mjs` mocks and assertions.
- Updated documentation.
2026-01-24 05:36:40 +00:00
google-labs-jules[bot] 7ecae5d7a2 feat(ci): enhance automated pr review with robust fix fallback and release channel checks
- Add sensitive path checks for storage/crypto services
- Add checks for modifications to critical config when targeting main
- Implement fallback for micro-fixes: create follow-up PR if push fails
- Add Audit Log to review comment
2026-01-23 23:16:40 +00:00
google-labs-jules[bot] e3ef3253dc chore(ai): add smoke test script (agent) 2026-01-23 21:34:07 +00:00
google-labs-jules[bot] bc7c50d278 feat(infra): add load testing script (agent) 2026-01-23 19:19:16 +00:00
google-labs-jules[bot] a731ef6887 fix(ai): frontend console error — fix missing build artifact and admin list fetch warning (agent)
- Added `start` script to `package.json` to ensure `npm run build` is executed before serving, preventing 404 errors for `css/tailwind.generated.css`.
- Updated `js/adminListStore.js` to include the super admin pubkey (decoded from `ADMIN_SUPER_NPUB`) in the filter when fetching admin lists. This resolves the warning: `[adminListStore] Cannot use incremental fetch for editors without author.`
- Added `scripts/agent/debug_frontend.py` to diagnose frontend errors using Playwright.
- Verified fixes by running the debug script and confirming warnings are gone.
2026-01-23 18:45:36 +00:00
google-labs-jules[bot] 92b95c9576 fix(ci): resolve hardcoded hex color lint errors
- replace hardcoded hex colors with rgb() equivalents in:
  - js/ui/loginModalController.js
  - js/ui/ambientBackground.js
  - js/ui/components/VideoModal.js
  - js/themeController.js
  - index.html
- exclude config/instance-config.js and config/validate-config.js from check-hex.js linting
- ensures CI lint jobs pass by adhering to token/rgb policy or exclusion lists

Signed-off-by: Jules <[email protected]>
2026-01-23 17:25:47 +00:00
thePR0M3TH3AN a47bfd5bb3 Merge pull request #1591 from PR0M3TH3AN/fix-ci-upstream-fetch-7572206809803325118
Fix CI upstream fetch depth for agent review
2026-01-23 11:42:40 -05:00
google-labs-jules[bot]andPR0M3TH3AN fbd4c217c2 fix(ci): fix upstream fetch depth in agent review (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-23 16:35:13 +00:00
thePR0M3TH3AN 2d7a270cd8 Merge pull request #1590 from PR0M3TH3AN/ds-audit/current-3661198684029160687
Design System Audit Automation & Tool Fixes
2026-01-23 11:31:37 -05:00
google-labs-jules[bot]andPR0M3TH3AN 82dea1e63e Design System Audit: Fix hex check tool and automate reporting
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-23 16:31:08 +00:00
thePR0M3TH3AN 2ae716e573 Merge pull request #1587 from PR0M3TH3AN/ai/fuzz-all-20260123-2279497469232188680
Fuzz testing and hardening for nostrEventSchemas and magnetUtils
2026-01-23 11:16:30 -05:00
google-labs-jules[bot]andPR0M3TH3AN 932e57c724 Fuzz testing and hardening for nostrEventSchemas and magnetUtils
- Added fuzzing scripts for nostrEventSchemas, dmDecryptor, and magnetUtils.
- Fixed crashes in nostrEventSchemas related to unsafe stringification of content.
- Fixed crash in magnetUtils when options argument is null.
- Added safeStringify helper in nostrEventSchemas.js.
- Included fuzzing reports and reproducers.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-23 16:12:42 +00:00
thePR0M3TH3AN d937f04ba3 update 2026-01-23 11:08:38 -05:00
google-labs-jules[bot] 3cd0532972 Refactor hardcoded styles to use token constants
Replaces hardcoded breakpoint values in `VideoCard.js` and `tailwind.source.css` with token constants and valid CSS calculations. Updates the token linting script to enforce these rules by removing the previous allowlists for these files. This ensures that all UI elements are defined by the central styling system.
2026-01-23 15:16:28 +00:00
google-labs-jules[bot] d0c6699cdc Add script to cancel all CI runs
Added `scripts/cancel-all-ci-runs.sh` to allow users to cancel all in-progress and queued GitHub Actions runs.
This script requires the GitHub CLI (`gh`) to be installed and authenticated.
It uses batch cancellation (`xargs`) and an increased limit (1000) for efficiency and coverage.
2026-01-23 13:36:14 +00:00
google-labs-jules[bot] e88efec6c5 Add interoperability test script
This commit adds `scripts/agent/interop-test.mjs` to verify protocol interoperability using `NostrClient` and `nostrEventSchemas` against a local test relay. Covers Video Post (kind 30078), View Event (kind 30079), and Encrypted DM.

Verified locally with Node.js and `simple-relay.mjs`.
2026-01-23 07:40:57 +00:00
google-labs-jules[bot] 70781b2b40 feat: Add privacy-preserving telemetry aggregator
- Implement `scripts/telemetry-aggregator.mjs` to parse logs and aggregate errors
- Add opt-in guardrail (`ENABLE_TELEMETRY=true`)
- Enforce PII sanitization for emails, IPs, and keys
- Generate `ai/reports/telemetry-YYYYMMDD.md`
- Signed-off-by: Jules <[email protected]>
2026-01-23 06:31:01 +00:00
google-labs-jules[bot] 653f1925f8 chore(ai): event schema validation tool + fixes
- Created `scripts/agent/validate-events.mjs` to validate event builders against schemas.
- Instrumented all event builders in `js/nostrEventSchemas.js` to run validation in dev mode.
- Added `tests/event-schemas.test.mjs` to CI suite.
- Updated `docs/nostr-event-schemas.md` with validation instructions.
2026-01-23 05:33:57 +00:00
google-labs-jules[bot] 8126403b10 feat(ci): add automated agent PR review script and workflow
- Add `scripts/automated-pr-review.mjs` to run format, lint, tests, and security checks.
- Add `.github/workflows/agent-pr-review.yml` to trigger the review on PRs.
- Script flags sensitive file changes (crypto/storage) and posts comments.
- Script attempts to commit formatting micro-fixes if permissions allow.
2026-01-22 23:12:45 +00:00
google-labs-jules[bot] a9cef919a8 Add Dockerfile and script for containerized Playwright testing
- Add `Dockerfile` based on `mcr.microsoft.com/playwright:v1.57.0-jammy`.
- Add `scripts/run-playwright-docker.sh` to build and run the container with volume mounts.
- Add `.dockerignore` to prevent host `node_modules` from corrupting the build.
- Update `README.md` with usage instructions.
2026-01-22 22:53:03 +00:00
google-labs-jules[bot] ce5ca30a03 feat: add pre-commit hook setup script
- Add `scripts/setup-pre-commit.sh` to install a git pre-commit hook.
- The hook runs `npm run lint` and `npm run build:css` to enforce quality and build consistency.
- Update `CONTRIBUTING.md` to document the new hook setup under Development Setup.
2026-01-22 22:38:46 +00:00
google-labs-jules[bot] c8b594feeb chore(ai): add smoke test script (agent)
- Updated scripts/agent/smoke-test.mjs with header and verification
- Updated package-lock.json (dependencies)
2026-01-22 21:38:27 +00:00
google-labs-jules[bot] 29df7ad507 feat: retain visual test artifacts on failure
- Updated `playwright.config.ts` to use separate projects for 'visual' and 'e2e' tests.
- Configured 'visual' project to retain screenshots, traces, and videos on failure.
- Set Playwright output directory to `artifacts/test-results`.
- Added `scripts/show-artifacts.sh` to help locate test artifacts.
- Updated `KNOWN_ISSUES.md` and `README.md` with debugging instructions.
2026-01-22 20:20:20 +00:00
google-labs-jules[bot] d1d448faf6 feat: add load testing script
- Implement `scripts/agent/load-test.mjs` for stress testing local relays.
- Simulate N clients publishing Video Post and View Events.
- Measure latency (Build, Sign, RTT), throughput, and system resources.
- Update `scripts/agent/simple-relay.mjs` to support configurable `PORT`.
- Include `artifacts/load-report-20260122.json` from a 1000-client run.
2026-01-22 19:42:13 +00:00
google-labs-jules[bot] c076cd9684 fix(ai): frontend console error — remove broken tracker (agent)
- Remove `wss://open.video.lukewarlow.uk:443/announce` from `DEFAULT_WSS_TRACKERS` in `js/constants.js`.
- This tracker was returning `net::ERR_SSL_PROTOCOL_ERROR`, causing console noise and connection failures.
- Added `scripts/agent/debug_frontend.py` to help diagnose frontend initialization errors.

Verified with `scripts/agent/debug_frontend.py` that the error is resolved.
Ran `npm run format`, `npm run lint`, and `npm run test:unit`.
2026-01-22 18:23:20 +00:00
google-labs-jules[bot] 0060f1f593 Fix: guard pointerTags iteration in buildWatchHistoryEvent
Fuzzer discovered a crash when `pointerTags` is passed as null.
Added array check to prevent TypeError.

Also added fuzz harnesses for schemas, dm decryptor and magnet utils.
2026-01-22 16:54:01 +00:00
thePR0M3TH3AN 12ee671261 Merge pull request #1498 from PR0M3TH3AN/ai/lint-20250523-15980727212633772968
chore(ai): apply formatting/lint autofixes
2026-01-22 10:19:27 -05:00
google-labs-jules[bot] f75531d2db chore(ai): format sources and fix moderation bugs (agent)
- Format `css/tailwind.source.css` with Prettier.
- Add allowlist entry for `VideoCard.js` media query pixel value in `scripts/check-design-tokens.mjs`.
- Remove accidental artifact `js/ui/dm/jules_session_4520373547615093905.zip`.
- Fix bug in `js/app.js` and `js/services/moderationActionController.js` where blocked users' videos were not correctly hidden in the UI immediately after blocking.
- Fix bug in `tests/app/moderation-overrides.test.mjs` where `userBlocks` mocks were insufficient to reflect state changes.
2026-01-22 14:58:35 +00:00
thePR0M3TH3AN 054fca8433 Add unit test sharding and timeouts 2026-01-22 09:58:18 -05:00
thePR0M3TH3AN 59d4116669 Merge branch 'unstable' into ai/lint-20250523-15980727212633772968 2026-01-22 09:29:42 -05:00
thePR0M3TH3AN 983e9bb0f6 Merge pull request #1494 from PR0M3TH3AN/ai/onboarding-20241026-11313740817798492612
docs(ai): improve onboarding steps
2026-01-22 09:18:55 -05:00
thePR0M3TH3AN 39c47fecea Merge pull request #1493 from PR0M3TH3AN/ai/interop-tests-20250222-7461951037331976125
Add Nostr Protocol Interoperability Tests
2026-01-22 09:17:32 -05:00
thePR0M3TH3AN b076b2b653 Merge pull request #1492 from PR0M3TH3AN/feature/telemetry-aggregation-privacy-12925310958469698001
Telemetry & Error Aggregation (Privacy-Preserving)
2026-01-22 09:15:55 -05:00
google-labs-jules[bot] 3952d44d34 chore(ai): format sources (agent)
- Format `css/tailwind.source.css` with Prettier.
- Add allowlist entry for `VideoCard.js` media query pixel value in `scripts/check-design-tokens.mjs`.
- Remove accidental artifact `js/ui/dm/jules_session_4520373547615093905.zip`.
2026-01-22 13:46:29 +00:00
google-labs-jules[bot] f93e5c6173 docs(ai): improve onboarding steps 2026-01-22 08:23:56 +00:00
google-labs-jules[bot] e0757f581f feat: add interoperability test script
- Adds `scripts/agent/interop-test.mjs` to verify protocol compliance.
- Tests Video Post, View Event, and encrypted Direct Message publishing/decryption.
- Uses ephemeral keys and a local relay (`simple-relay.mjs`).
- Polyfills browser environment for `NostrClient` execution in Node.js.
2026-01-22 07:19:21 +00:00