saravanakumardb1
1744bcf63f
feat(api): NomGap fasting modules — sessions CRUD + stats, 14 built-in protocols + custom CRUD, body stages + autophagy confidence (47 new tests, 717 total)
2026-02-27 22:32:28 -08:00
saravanakumardb1
0c4210f5ff
docs(local-llm): update original setup doc to redirect to docs/ structure
...
- LOCAL_LLMs_setup_mac_m4_48gb.md: replace 279-line monolith with quick start
+ documentation index linking to 9 topic-specific docs in docs/
- Add .gitignore for extraction-service eval logs (generated artifacts)
2026-02-19 13:01:35 -08:00
saravanakumardb1
798a85e88b
fix(extraction-service): fix Ollama eval assertions — 19/19 passing (100%)
...
Two root causes fixed:
1. promptfoo javascript assertions must be single expressions — replaced
'const r=...; return ...;' blocks with function(e){return ...} expressions
2. llama3.1:8b under-extracts secondary classes (person, entity, brain_signal)
— relaxed assertions to accept equivalent classes or matching text content
while preserving meaningful signal checks
Result: 0/19 → 10/19 (syntax fix) → 16/19 → 19/19 (model behavior tuning)
2026-02-19 12:54:34 -08:00
saravanakumardb1
f0accc0946
feat(extraction-service): add unattended eval runner with structured logging
...
- Add evals/run-ollama-evals-logged.sh: self-logging eval script that runs
without babysitting; writes timestamped log to evals/logs/; includes
Ollama health check, model availability check (auto-pulls if missing),
JSON smoke test, cache clear, full promptfoo run, pass-rate summary,
and macOS notification on completion
- Update package.json scripts: add eval, eval:ci, eval:task, eval:json,
eval:ollama, eval:compare
2026-02-19 12:19:34 -08:00
saravanakumardb1
da9ca9dc1a
feat(extraction-service): add Ollama local model eval config and compare script
...
- Add evals/promptfoo.ollama.yaml: same 19 cases hitting Ollama OpenAI-compat
API directly (no extraction-service needed); all assertions use inline
JSON.parse(output) to handle raw string response from Ollama
- Add evals/compare-evals.sh: runs Gemini + Ollama evals back-to-back and
prints side-by-side pass-rate comparison table
- Supports OLLAMA_MODEL env var (default: llama3.1:8b)
2026-02-19 12:19:24 -08:00
saravanakumardb1
acd4c3542b
feat(extraction-service): scaffold promptfoo eval suite with 19 test cases
...
- Add evals/promptfoo.yaml: HTTP provider hitting extraction-service API
covering all 5 built-in tasks (transcript, triage, memory-insight,
reflection-enrichment, bug-report-extraction)
- Add evals/fixtures/golden.json: machine-readable golden input/output fixtures
- Add evals/run-evals.sh: shell runner with health checks, auth token
handling, task filtering, and CI mode
- Add evals/README.md: usage docs, prerequisites, cost estimates, CI integration
2026-02-19 12:19:16 -08:00
saravanakumardb1
ca70a05e1d
feat(flags): add region, osVersion targeting to feature flags
...
- Add OsVersionRange interface + Zod schema (platform, minVersion?, maxVersion?)
- Add regions[] and osVersions[] to FeatureFlagDoc, CreateFlagSchema, UpdateFlagSchema
- Add compareVersions() helper for dot-separated semver comparison
- Extend GET /flags/poll with ?region and ?osVersion query params
- Region targeting: flag only returned if client region is in flag's regions list
- OS version targeting: per-platform min/max version range filtering
- Add 10 new tests (schema validation, compareVersions edge cases)
- 634 tests passing, tsc clean
2026-02-17 20:53:48 -08:00
saravanakumardb1
6f7299aa7a
fix(monitoring): update health-check endpoints for consolidated services
...
- Remove defunct growth-service (4001), billing-service (4002), tracker-service (4004)
- Add backend API (8000), extraction sidecar (4006), all 3 dashboards (3001-3003)
- Reorder: backend → services → dashboards → infra
2026-02-17 20:53:37 -08:00
ff4cc14a46
fix(extraction-service): run python sidecar on railway
2026-02-17 11:32:40 -08:00
saravanakumardb1
51e2ecdec8
test(telemetry): Phase 3 regression tests — UpdateClusterSchema, ClusterStatusEnum, extractClientIp (614→624 tests)
2026-02-17 11:24:59 -08:00
saravanakumardb1
788ee57935
docs(telemetry): update routes doc comment with all 14 endpoints
2026-02-17 11:23:38 -08:00
saravanakumardb1
08b9642408
fix(telemetry): 3 bugs — Slack Block Kit text key, cluster reopen clears resolution, affectedInstallIds uses correct ID
2026-02-17 11:22:13 -08:00
saravanakumardb1
0bfd4bdf22
feat(telemetry): geo distribution endpoint (GET /telemetry/geo) with Cosmos GROUP BY aggregation
2026-02-17 11:13:55 -08:00
saravanakumardb1
61c919a916
feat(telemetry): Phase 3 — policy preview endpoint (count matching clients from recent events)
2026-02-17 10:59:13 -08:00
saravanakumardb1
2f61ea517c
feat(telemetry): Phase 3 — geo enrichment, Prometheus metrics export endpoint
2026-02-17 10:56:19 -08:00
saravanakumardb1
80a4459f81
docs: update documentation
2026-02-17 10:49:14 -08:00
saravanakumardb1
2fb341048e
feat(telemetry): Phase 3 — rate limiting, batch dedup, ETag config caching (614 tests)
2026-02-17 10:24:07 -08:00
saravanakumardb1
20f77d5a50
test(telemetry): add route-logic tests — containsPII, computePk, normalizeMessage, fingerprint, policyMatch, mergePolicies (34→77 tests)
2026-02-17 09:42:57 -08:00
saravanakumardb1
ce4c4ff53d
feat(telemetry): add telemetry module — ingest, config, query, clusters, policies (34 tests)
2026-02-17 09:06:43 -08:00
saravanakumardb1
18a5b342d9
fix(request-context): block sunset products in public productId resolver
2026-02-16 23:45:17 -08:00
saravanakumardb1
b0e8304d59
test(server): update @bytelyst/config mock for loadProductIdentity
2026-02-16 23:28:52 -08:00
saravanakumardb1
c7480661eb
fix(waitlist): harden public endpoints and unsubscribe validation
...
- Block sunset products on public waitlist join/count/config endpoints
- Verify unsubscribe email matches unsubscribeToken before status change
- Keep idempotent join behavior explicit for existing entries (200 path)
- Escape CSV newline/carriage-return values to prevent malformed exports
- Refactor request productId extraction to shared helper in request-context
- Guard prelaunchConfig merge with safe default object in products update route
2026-02-16 23:28:32 -08:00
saravanakumardb1
6a996cc11d
test(waitlist): add 45 unit tests + update doc checkboxes with commit links
...
- 45 tests: schema validation, email normalization, status transitions, route exports
- Update Phase 1, 2, 3, 4 checkboxes in PRE_LAUNCH_SIGNUP_SYSTEM.md with commit SHAs
- Add webhook env vars to .env.example
2026-02-16 22:49:42 -08:00
saravanakumardb1
2692c918ce
feat(waitlist): add pre-launch waitlist module (types, repo, routes)
...
- Create waitlist/types.ts: WaitlistEntryDoc, Zod schemas for join/status/unsubscribe/admin
- Create waitlist/repository.ts: full CRUD, dedup by emailNormalized, position assignment, stats
- Create waitlist/routes.ts: 5 public endpoints + 7 admin endpoints with role guard
- Add waitlist container to cosmos-init.ts (+ 13 previously missing containers)
- Add dispatchWaitlistJoined webhook to webhooks.ts
- Register waitlistRoutes in server.ts
- Public: join, check status, count, config, unsubscribe
- Admin: list, stats, get, update, delete, batch invite, CSV export
2026-02-16 22:45:14 -08:00
saravanakumardb1
66e657a646
feat(products): extend product status lifecycle + prelaunch config
...
- Add 6 product statuses: draft, pre_launch, beta, active, sunset, disabled
- Add PrelaunchConfig with customFields, CAPTCHA, tagline, maxSignups
- Add isValidStatusTransition() helper for safe status changes
- Update getRequestProductId() to block draft/sunset/disabled
- Add getRequestProductIdForPublic() for pre_launch waitlist routes
- Add status transition validation to product update route
- Add PRE_LAUNCH_SIGNUP_SYSTEM.md design doc with full roadmap
2026-02-16 22:36:53 -08:00
saravanakumardb1
209213b50d
test(server): cover platform bootstrap wiring and hooks
2026-02-16 15:25:27 -08:00
saravanakumardb1
1df94103ea
test(cosmos): add init path coverage for platform-service
2026-02-16 15:22:38 -08:00
saravanakumardb1
e3f173c164
test(config): add env schema coverage for platform-service
2026-02-16 15:20:04 -08:00
saravanakumardb1
9fbaf60ba8
test(platform-service): add route coverage for items invitations audit
2026-02-16 15:00:13 -08:00
saravanakumardb1
7179f1e7c4
test(platform-service): add promos route-level tests
2026-02-16 12:46:40 -08:00
saravanakumardb1
e4ee23aab4
test(platform-service): add comments route-level tests
2026-02-16 12:43:56 -08:00
saravanakumardb1
3e1647ae96
test(platform-service): add tokens route-level tests
2026-02-16 12:41:34 -08:00
saravanakumardb1
dc0cf6d8b4
test(platform-service): add referrals route-level tests
2026-02-16 12:38:42 -08:00
saravanakumardb1
783b9792df
test(platform-service): add memory route-level tests
2026-02-16 12:36:27 -08:00
saravanakumardb1
8576fe2e91
test(platform-service): add route tests for settings, votes, and public modules
2026-02-16 12:33:17 -08:00
saravanakumardb1
c7934af227
test(platform-service): add subscriptions route-level tests — 395 tests, 39.6% stmts
2026-02-16 12:17:00 -08:00
saravanakumardb1
1cb9af3ae4
test(platform-service): add usage route-level tests — 386 tests, 37.9% stmts
2026-02-16 12:15:40 -08:00
saravanakumardb1
149d97dd9f
test(platform-service): add route-level tests for plans + notifications — 379 tests, 35.4% stmts
2026-02-16 12:14:42 -08:00
saravanakumardb1
87f7d76915
test(platform-service): add products, cache, votes repository tests — 362 tests, 32.6% stmts
2026-02-16 12:08:40 -08:00
saravanakumardb1
747d89fe4d
test(platform-service): add repository tests for settings, referrals — 336 tests, 30.64% coverage
2026-02-16 12:05:03 -08:00
saravanakumardb1
fbb2197f7c
test(platform-service): add repository tests for notifications, plans, subscriptions, usage, tokens, memory + fix extraction-service flaky test
2026-02-16 11:59:06 -08:00
saravanakumardb1
7524c4d29e
feat(platform-service): add GET /settings/kill-switch public endpoint
...
- No auth required — mobile apps call this at launch before login
- Reads kill_switch feature flag from Cosmos DB
- If flag enabled=true → returns disabled:true with maintenance message
- Fail-open: DB errors allow app to run normally
- Response: { enabled: bool, disabled: bool, message: string }
Used by iOS KillSwitchService.swift and Android KillSwitchService.kt
2026-02-15 21:30:03 -08:00
saravanakumardb1
5622499575
feat(licenses): add POST /licenses/revoke endpoint
...
Sets license status to 'revoked' and clears all device activations.
Returns the updated license doc. Idempotent — already-revoked licenses
return immediately.
2026-02-15 20:15:10 -08:00
saravanakumardb1
972a1a21d7
feat(usage): cross-product usage queries + product breakdown
...
- Make productId optional in repository list() — omitting it queries all products
- Add resolveProductFilter() helper: productId=_all skips filter, specific value overrides default
- Add ProductBreakdown interface for per-product aggregation
- Summary endpoint now returns productBreakdown[] alongside model/source breakdowns
- Enables admin to compare John's LysnrAI usage vs MindLyst usage
2026-02-15 19:47:23 -08:00
saravanakumardb1
1cf74d22fa
feat(usage): add source/platform tracking + source breakdown in summary
...
- Add optional 'source' field to UsageDoc (desktop/web/ios/android)
- Add 'source' to UpsertUsageSchema validation
- Include source in upsert document ID to avoid cross-platform overwrites
- Add SourceBreakdown interface
- Aggregate sourceBreakdown in GET /usage/summary alongside modelBreakdown
- Clients can now pass source when reporting usage for per-app analytics
2026-02-15 18:57:16 -08:00
saravanakumardb1
b977e85bc2
feat(platform-service): add profile updates, tokens, and themes modules
...
Auth:
- PUT /auth/profile — self-service profile update (displayName, phone, bio, avatarUrl)
- ProfileUpdateSchema added to types.ts
- Repository update() expanded to accept profile fields
Tokens module (new):
- GET /tokens — list tokens (admin: all, user: own)
- POST /tokens — create API token (admin only)
- GET /tokens/count — count active tokens
- PATCH /tokens/:id — revoke token (admin only)
- DELETE /tokens/:id — delete token (super_admin only)
Themes module (new):
- GET /themes — list all themes (admin only)
- POST /themes — create theme (admin only)
- GET /themes/active — get active theme (public, no auth)
- GET /themes/:id — get theme by id (admin only)
- PUT /themes/:id — update theme (admin only)
- DELETE /themes/:id — delete theme (admin only)
- POST /themes/:id/activate — set theme as active (admin only)
2026-02-15 17:29:43 -08:00
saravanakumardb1
be3f5459bd
feat(platform-service): add SSO login endpoint (/auth/sso)
...
- POST /auth/sso — accepts verified email + provider + productId
- Creates user if not exists (with subscription + license provisioning)
- Issues platform JWT tokens for existing SSO users
- Supports Microsoft and Google OAuth providers
- Added SsoLoginSchema to types.ts
2026-02-15 16:38:10 -08:00
saravanakumardb1
c7fb2eb357
feat(platform-service): add admin user management routes
...
- GET /auth/users — list users (paginated, admin-only)
- GET /auth/users/count — total + by-plan counts
- GET /auth/users/:id — get user by id
- PUT /auth/users/:id — update user (displayName, role, plan, status)
- DELETE /auth/users/:id — delete user
- repository: added list, count, countByPlan, update, remove functions
- types: added UpdateUserSchema
2026-02-15 16:21:26 -08:00
saravanakumardb1
aaf7ec5b59
fix(licenses): add deviceName and platform to ActivateLicenseSchema
...
Desktop and mobile clients send deviceName and platform in the activate
payload. Without these fields in the schema, they were silently stripped
by Zod. Now accepted as optional fields for contract alignment.
2026-02-15 15:41:52 -08:00
saravanakumardb1
daccbaea6c
fix(stripe): remove dead syncUserPlan call to deleted backend /api/users/:userId/plan route
...
The Python backend users.py route was deleted in the backend cleanup.
Plan updates are already handled by authRepo.updatePlan() inline in
each webhook handler — the syncUserPlan fetch was redundant dead code.
2026-02-15 15:40:42 -08:00