4 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 5f0aefe67e test: add comprehensive tests for renderPromptWithMemoryContext
Adds test cases for `renderPromptWithMemoryContext` in `src/services/memory/formatter.js`, covering:
- Agent context serialization (arrays, objects, primitives)
- Memory usage updates side effects
- Edge cases for empty/null memories
- Feature flag handling (global toggle and allowlist)
- Parameter passing (k, tokenBudget)

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 18:52:30 +00:00
google-labs-jules[bot]andPR0M3TH3AN e5b2394284 test: add coverage for circular agentContext in memory formatter
Add a test case to `test/memory-formatter.test.mjs` to ensure that `renderPromptWithMemoryContext` handles circular references in `agentContext` by falling back to `String(agentContext)` instead of throwing a `JSON.stringify` error.

This addresses a missing edge case in JSON serialization testing.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 18:33:44 +00:00
google-labs-jules[bot]andPR0M3TH3AN 20ba1567d8 test: add unit tests for memory formatter
- Added `test/memory-formatter.test.mjs` with comprehensive unit tests for:
  - `estimateTokenCount`
  - `formatMemoryBlock`
  - `formatMemoriesForPrompt`
  - `renderPromptWithMemoryContext`
- Verified all tests pass and no regressions in related tests.
- Addressed testing gap in `src/services/memory/formatter.js`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 17:10:52 +00:00