Commit Graph
16 Commits
Author SHA1 Message Date
Claude 639ad6877d chore: code quality, CI/CD, and DX improvements
Phase 3 — Code Quality:
- Deduplicate nowUnix() in lock-ops.mjs (import from utils.mjs)
- Promote ESLint no-unused-vars to error, fix all 46 violations
- Remove dead code: unused imports, variables, and catch bindings
- Add /* global marked */ for CDN-loaded library in dashboard

Phase 4 — CI/CD:
- Add Node.js version matrix (22, 23) to CI workflow
- Add npm audit security scan step to CI
- Add innerHTML usage check to CI pipeline
- Enable Dependabot for npm and GitHub Actions dependencies
- Create PR template

Phase 5 — Developer Experience:
- Create .env.example documenting all environment variables
- Expand CONTRIBUTING.md with commit conventions, agent/prompt
  creation guide, architecture overview, and test integrity
- Add system architecture diagram with Mermaid (docs/architecture/)

https://claude.ai/code/session_01GfwUNbgeMgXreFDbsNQMsS
2026-02-19 21:03:30 +00:00
google-labs-jules[bot]andPR0M3TH3AN 6614535361 perf: optimize rankRelays for subset queries
- Optimized `RelayHealthManager.rankRelays` to use O(M log M) lookup for small subsets instead of O(N) filter.
- Added `byRelay` Map to `_sortedCache` for O(1) access.
- Fixed `NaN` bug in `buildRelayHealthConfig` when `minActiveRelayPool` is undefined.
- Updated `perf/benchmark-lock-ops.mjs` to measure subset performance.
- Added performance report `reports/performance/weekly-perf-report-2026-02-18.md`.
- Achieved ~6.8x speedup in benchmark.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 19:54:47 +00:00
thePR0M3TH3AN 62731f77fd Merge pull request #301 from PR0M3TH3AN/chore/clean-repo-standard-12872616590007917715
chore: Enforce Clean Repo Standard and organize artifacts
2026-02-18 14:28:33 -05:00
google-labs-jules[bot]andPR0M3TH3AN 326608ce7e chore: Enforce Clean Repo Standard and organize artifacts
- Added "Clean Repo Standard" to `AGENTS.md` and `CLAUDE.md`, explicitly forbidding root-level logs/artifacts.
- Moved clutter files (`test_output_full.txt`, `benchmark-after.txt`, `dashboard.log`, etc.) to `test_logs/`, `task-logs/`, and `reports/performance/`.
- Moved `INITIAL_BASELINE.md` and other baseline files to `reports/performance/`.
- Updated `src/prompts/daily/perf-agent.md` and `src/prompts/daily/const-refactor-agent.md` to reference the new location of `INITIAL_BASELINE.md`.
- Updated `.gitignore` to ignore logs and temporary artifacts in the new directories.
- Moved `DIAGNOSIS.md` to `reports/performance/`.
- Moved `perf/` data files to `reports/performance/`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 19:28:03 +00:00
google-labs-jules[bot]andPR0M3TH3AN b29f257b98 [security] replace innerHTML usages in landing/index.html — convert to safe DOM APIs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 19:17:12 +00:00
thePR0M3TH3AN b6775cda28 Merge pull request #289 from PR0M3TH3AN/optimize-relay-ranking-1239301882622685923
⚡ Optimize relay ranking with caching
2026-02-17 22:45:08 -05:00
google-labs-jules[bot]andPR0M3TH3AN a9f30f13f9 feat(perf): cache relay ranking in RelayHealthManager
- Implement caching for `rankRelays` to avoid redundant sorting and computations.
- Cache is invalidated on new outcomes or when quarantine status changes.
- Add `_metricsVersion` to track metrics updates.
- Benchmarks show ~3x performance improvement (0.06ms -> 0.02ms per call for 100 relays).
- Add unit tests for caching behavior and invalidation.
- Add `perf/benchmark-lock-ops.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 03:33:59 +00:00
google-labs-jules[bot]andPR0M3TH3AN ace069cc19 perf(pruner): optimize groupNearDuplicates to O(N log N) from O(N^2)
Sorts memories by created_at and uses an early exit condition in the inner loop to avoid checking all pairs. This reduces complexity from O(N^2) to roughly O(N * k) where k is the number of items within the duplicate window.

Measured improvement for 30k items: ~2.1s -> ~0.25s (8x speedup).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 03:30:11 +00:00
google-labs-jules[bot]andPR0M3TH3AN 9e993800fa [scheduler] daily/decompose-agent: Decompose scripts/agent/run-scheduler-cycle.mjs
- Executed daily scheduler cycle.
- Selected `decompose-agent` (next in roster).
- Decomposed `scripts/agent/run-scheduler-cycle.mjs` (1127 lines) into `scripts/agent/scheduler-utils.mjs` (195 lines) and `scripts/agent/scheduler-lock.mjs` (173 lines).
- Resulting main file size: 788 lines (339 lines reduction).
- Fixed lint warnings.
- Updated `test/scheduler-preflight-lock.e2e.test.mjs`, `test/run-scheduler-cycle-memory-policy.test.mjs`, `test/scheduler-lock-failure-schema.contract.test.mjs` to copy new modules into test fixtures.
- Updated `test/scheduler-ratchet.test.mjs` to verify moved functions in `scheduler-lock.mjs`.
- Note: `scripts/check-file-size.mjs` was not updated as it lacks the baseline feature referenced in the prompt.
- Created artifacts: `src/context/CONTEXT_...`, `src/decisions/DECISIONS_...`, `src/test_logs/TEST_LOG_...`, `src/todo/TODO_...`.
- Created scheduler log: `task-logs/daily/2026-02-17T22-29-00Z__decompose-agent__completed.md`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 22:41:37 +00:00
google-labs-jules[bot]andPR0M3TH3AN 03ccb232ee Refactor lock backend constants and fix scheduler syntax error
- Extracted hardcoded retry/health constants from `src/lock-ops.mjs` to `src/constants.mjs`.
- Refactored `src/lock-ops.mjs` to use `LockPublisher` class pattern and shared constants.
- Fixed `SyntaxError` in `src/lock-ops.mjs` (function inside function).
- Fixed `ReferenceError` in `src/cmd-check.mjs` (`queryLocksFn` -> `queryLocks`).
- Verified with unit tests (`test:unit:lock-backend`) and linting.
- Completed daily scheduler cycle for `const-refactor-agent`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 19:50:48 +00:00
thePR0M3TH3AN c035f6994d Merge pull request #201 from PR0M3TH3AN/agents/daily/perf-agent-2026-02-17-15937880158330257401
chore(scheduler): execute daily perf-agent cycle
2026-02-16 19:29:18 -05:00
google-labs-jules[bot]andPR0M3TH3AN 2df15cb585 chore(scheduler): execute daily perf-agent cycle
Executed the daily perf-agent cycle.
- Acquired lock for perf-agent.
- Executed memory retrieval.
- Generated context, todo, decisions, test_logs, and perf report artifacts.
- Executed memory storage.
- Verified artifacts.
- Completed lock and generated task log.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 00:09:26 +00:00
google-labs-jules[bot]andPR0M3TH3AN 19af4dcba5 perf: visibility-gate dashboard render loop
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-16 23:09:11 +00:00
google-labs-jules[bot]andPR0M3TH3AN 703c351ff2 [constants] replace magic number 30078 with KIND_APP_DATA in cmd-lock.mjs
Refactored src/cmd-lock.mjs to use KIND_APP_DATA constant instead of hardcoded 30078.
Added refactor artifacts.
Created task completion log.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-15 22:15:06 +00:00
google-labs-jules[bot]andPR0M3TH3AN eff5f1db81 chore: run daily perf-agent and fix validation
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-15 01:35:36 +00:00
google-labs-jules[bot]andPR0M3TH3AN fdfbb39da6 Decompose src/lib.mjs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:16:01 +00:00