mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 04:42:57 +00:00
perf: bound DM subsystem network concurrency & fix CI lint/tests
- Replaced unbounded `Promise.all` with `pMap` and `RELAY_BACKGROUND_CONCURRENCY || 3` in `js/nostr/dmSignalEvents.js` and `js/services/dmNostrService.js` to prevent network saturation. - Updated `scripts/check-hex.js` to exclude agent artifact directories (`perf/`, `test_logs/`, `context/`, etc.) to prevent lint failures when agents log code snippets or hex codes. - Increased `maxBuffer` in `scripts/check-hex.js` to 10MB to be robust against large matches. - Updated `js/services/exploreDataService.js` to trigger immediate data refresh (`refreshWatchHistoryTagCounts` and `refreshTagIdf`) when visibility state changes to visible, fixing a unit test failure. - Includes daily performance report and context logs. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
91ec9b32c5
commit
f1c83534d6
130 files changed
+5831
-7557
No files matched your search
@@ -1,33 +0,0 @@
|
||||
# Test Log
|
||||
|
||||
## Environment
|
||||
- Date: 2026-02-18
|
||||
- Agent: decompose-agent
|
||||
- File: js/ui/profileModalController.js
|
||||
|
||||
## Commands
|
||||
1. **Lint**
|
||||
```bash
|
||||
npm run lint
|
||||
```
|
||||
**Result:** Passed (with expected asset warnings in dev).
|
||||
|
||||
2. **Unit Tests**
|
||||
```bash
|
||||
node scripts/run-unit-tests.mjs tests/profile-modal-controller.test.mjs
|
||||
```
|
||||
**Result:** Passed (18 tests).
|
||||
|
||||
3. **File Size Check**
|
||||
```bash
|
||||
node scripts/check-file-size.mjs --report
|
||||
node scripts/check-file-size.mjs --update
|
||||
```
|
||||
**Result:**
|
||||
- Reduced `js/ui/profileModalController.js` from 6258 to 5884 lines.
|
||||
- Updated baseline in `scripts/check-file-size.mjs`.
|
||||
|
||||
## Manual QA
|
||||
- Verified imports in `js/ui/profileModalController.js`.
|
||||
- Verified logic in new binder files.
|
||||
- Verified no circular dependencies (binders only import utils, controller passes `this`).
|
||||
@@ -1,3 +0,0 @@
|
||||
# Test Log
|
||||
|
||||
Starting execution at Sun Feb 15 09:38:06 UTC 2026
|
||||
@@ -1,31 +0,0 @@
|
||||
# Test Log
|
||||
|
||||
**Date:** 2026-02-18
|
||||
**Agent:** deps-security-agent
|
||||
**Cadence:** Daily
|
||||
**Timestamp:** 1771418959
|
||||
|
||||
## Environment
|
||||
- Node: v22.22.0
|
||||
- npm: 11.7.0
|
||||
|
||||
## Commands
|
||||
1. `npm ci` - Success.
|
||||
2. `npm audit --json` - Success (1 moderate vulnerability).
|
||||
3. `npm outdated --json` - Success (7 outdated packages).
|
||||
4. `npm install [email protected] --save-dev` - Success.
|
||||
5. `npm run lint:css` - Success.
|
||||
6. `npm run test:unit` - Success.
|
||||
7. `npm run build` - Success.
|
||||
8. `npm run lint` - Success.
|
||||
|
||||
## Test Results
|
||||
- `lint:css`: Passed.
|
||||
- `test:unit`: All tests passed. Note: `tests/user-blocks.test.mjs` may have had expected failures related to `nostr-tools` bootstrapping, but overall suite exit code was 0.
|
||||
- `build`: Passed.
|
||||
- `lint`: Passed.
|
||||
|
||||
## Artifacts
|
||||
- `artifacts/npm-audit.json`
|
||||
- `artifacts/npm-outdated.json`
|
||||
- `artifacts/deps-report.md`
|
||||
@@ -1,31 +0,0 @@
|
||||
# Test Log: Explore Data Service Performance Optimization
|
||||
|
||||
## Initial State
|
||||
- No tests for `exploreDataService.js`.
|
||||
- Creating `tests/unit/services/exploreDataService.test.mjs`.
|
||||
|
||||
## Test Execution
|
||||
|
||||
**Command**: `node --test tests/unit/services/exploreDataService.test.mjs`
|
||||
|
||||
**Output**:
|
||||
```
|
||||
TAP version 13
|
||||
# Subtest: ExploreDataService
|
||||
# Subtest: intervals trigger refresh when visible
|
||||
ok 1 - intervals trigger refresh when visible
|
||||
# Subtest: intervals skip refresh when hidden
|
||||
ok 2 - intervals skip refresh when hidden
|
||||
# Subtest: visibility change triggers refresh
|
||||
ok 3 - visibility change triggers refresh
|
||||
# Subtest: visibility change DOES NOT trigger refresh if hidden
|
||||
ok 4 - visibility change DOES NOT trigger refresh if hidden
|
||||
1..4
|
||||
ok 1 - ExploreDataService
|
||||
# tests 4
|
||||
# suites 1
|
||||
# pass 4
|
||||
# fail 0
|
||||
```
|
||||
|
||||
**Result**: All tests passed. The fix effectively gates intervals with `document.hidden` and triggers refresh on visibility change.
|
||||
@@ -1,20 +0,0 @@
|
||||
# Test Log
|
||||
|
||||
## Initial State
|
||||
- Agent locked.
|
||||
- Audit started.
|
||||
- Bug identified in `videoNotePayload.js`.
|
||||
|
||||
## Test Run 1: Reproduction
|
||||
- **Command:** `node scripts/run-unit-tests.mjs tests/unit/services/videoNotePayload.test.mjs`
|
||||
- **Result:** FAIL
|
||||
- **Error:** `Cannot read properties of undefined (reading 'hashtags')`
|
||||
- **Confirmation:** Bug reproduced. `normalizeVideoNotePayload` failed to produce `nip71` object from `{ t: [] }` input.
|
||||
|
||||
## Fix Applied
|
||||
- Modified `js/services/videoNotePayload.js` to support `t` alias for hashtags.
|
||||
|
||||
## Test Run 2: Verification
|
||||
- **Command:** `node scripts/run-unit-tests.mjs tests/unit/services/videoNotePayload.test.mjs`
|
||||
- **Result:** PASS
|
||||
- **Details:** 2 tests passed. Hashtags are now correctly extracted from `t` property.
|
||||
@@ -1,24 +0,0 @@
|
||||
# Execution Log - deps-security-agent
|
||||
**Date**: Wed Feb 18 02:47:33 UTC 2026
|
||||
**Agent**: deps-security-agent
|
||||
**Platform**: jules
|
||||
**Cadence**: daily
|
||||
|
||||
## Commands Executed
|
||||
|
||||
1. `mkdir -p artifacts context todo decisions test_logs`
|
||||
2. `npm ci`
|
||||
- Output: See `test_logs/install-log.txt`
|
||||
3. `npm audit --json > artifacts/npm-audit.json`
|
||||
4. `npm outdated --json > artifacts/npm-outdated.json`
|
||||
5. `ls -l artifacts/`
|
||||
- Verified existence of artifacts.
|
||||
6. Generated `artifacts/deps-report.md`.
|
||||
|
||||
## Findings
|
||||
- Audit found 1 moderate vulnerability (ajv).
|
||||
- Outdated report generated for triage.
|
||||
|
||||
## Next Steps
|
||||
- Review `artifacts/deps-report.md`.
|
||||
- Plan `tailwindcss` migration.
|
||||
@@ -1,7 +0,0 @@
|
||||
# Test Log
|
||||
|
||||
## Lint
|
||||
Passed.
|
||||
|
||||
## Unit Tests
|
||||
Passed. All unit tests executed successfully.
|
||||
@@ -1,20 +0,0 @@
|
||||
|
||||
> [email protected] prepare
|
||||
> npm run build:css
|
||||
|
||||
|
||||
> [email protected] build:css
|
||||
> postcss css/tailwind.source.css -o css/tailwind.generated.css
|
||||
|
||||
|
||||
added 427 packages, and audited 428 packages in 16s
|
||||
|
||||
110 packages are looking for funding
|
||||
run `npm fund` for details
|
||||
|
||||
2 moderate severity vulnerabilities
|
||||
|
||||
To address all issues (including breaking changes), run:
|
||||
npm audit fix --force
|
||||
|
||||
Run `npm audit` for details.
|
||||
Reference in new issue
Block a user