saravanakumardb1
89b38cadfa
docs(workspace): add coverage audit prompt
2026-03-21 12:40:12 -07:00
saravanakumardb1
4a47db72ae
fix(flags): SSE stream endpoint + client — pass productId via query string
...
EventSource API cannot set custom headers, so the SSE /flags/stream
endpoint and feature-flag-client were broken for streaming mode:
- Server: accept productId and token from query string as fallback
when x-product-id / authorization headers are absent
- Client: pass productId (and optional auth token) as query params
when constructing the EventSource URL
2026-03-21 12:12:14 -07:00
saravanakumardb1
0b16cb4d63
fix(test): add test env defaults to root vitest config — fixes 35 pre-existing failures
...
Root vitest.config.ts now sets:
- DB_PROVIDER=memory — datastore uses MemoryDatastoreProvider (no Cosmos needed)
- RATE_LIMIT_STORE_MODE=memory — ratelimit store uses in-memory sliding window
- COSMOS_ENDPOINT, COSMOS_KEY, JWT_SECRET — test-safe placeholders so config.ts
Zod parse succeeds (never used at runtime with DB_PROVIDER=memory)
This fixes 35 pre-existing test failures across 6 files when running from root:
- ratelimit.test.ts (15 tests) — was hitting Cosmos path
- diagnostics.test.ts (4 tests) — was hitting Cosmos path
- auto-register.test.ts (8 tests) — config parse failed
- onboarding.test.ts (1 test) — config parse failed
- telemetry.test.ts (suite) — config parse failed via event-bus import chain
- cross-product.test.ts (6 tests) — config parse failed
Platform-service: 117/117 files, 1389/1389 tests (was 1251 passing)
2026-03-21 12:06:34 -07:00
saravanakumardb1
32afe8dde7
docs(e2ee): update roadmap — ChronoMind + PeakPulse backends encrypted (9 total)
...
- ChronoMind: timers.description, routines.description, routines.steps[].notes (182 tests)
- PeakPulse: peak-sessions.notes (65 tests)
- Only MindLyst (KMP) and LocalMemGPT (SQLite) deferred
2026-03-21 12:04:10 -07:00
saravanakumardb1
1e1ee969dc
feat(flags): add seed flags for 6 missing products + 6 new evaluator edge-case tests
...
- seed.ts: add default flags for jarvisjr (3), peakpulse (3), flowmonk (2), notelett (2), actiontrail (2), localmemgpt (2)
Previously only chronomind, nomgap, mindlyst, smartauth, lysnrai had seed flags — common flags (maintenance_mode, telemetry_enabled) were not seeded for newer products
- flags.test.ts: 63 → 69 tests (+6):
- anonymous user with partial percentage returns off
- partial rule rollout (0%) skips even matching users
- neq operator (not equal)
- contains operator
- gte + lt numeric range on custom attributes
- missing context attribute returns off
2026-03-21 11:52:08 -07:00
saravanakumardb1
dd113b96c9
fix(flags): critical partition key bug + audit snapshot integrity + anonymous rollout
...
- repository.ts: update() and remove() now require productId as partition key
(was passing 'id' as both params — works with memory provider but fails on Cosmos DB)
- repository.ts: updateSegment() and removeSegment() also fixed
- routes.ts: all repo.update/remove calls updated to pass productId
- routes.ts: audit 'before' snapshots now use JSON deep copy instead of shallow spread
(prevents nested object mutation from corrupting audit trail)
- routes.ts: kill switch audit now uses repo.update() return value for 'after' snapshot
- evaluator.ts: anonymous users (no userId) with partial percentage (0 < pct < 100)
now correctly return 'off' instead of falling through to default variation
(can't deterministically hash without a userId)
2026-03-21 11:50:08 -07:00
saravanakumardb1
ca6a4d41d8
feat(flags): production-grade feature flag system — multi-variate, segments, audit, SSE, scheduling, prerequisites
...
- types.ts: multi-variate flags (boolean/string/number/JSON), targeting rules with 18 operators, scheduling (enableAt/disableAt/gradual rollout), prerequisites, segments, audit log, evaluation context
- evaluator.ts: pure evaluation engine — schedule checking, prerequisite dependencies (circular detection), individual targeting, targeting rules (AND clauses), segment matching, percentage rollout (FNV-1a), OS version/platform/region filtering
- repository.ts: 3 collections — feature_flags, flag_segments, flag_audit_log
- routes.ts: 18 endpoints — flag CRUD, toggle, archive, kill switch (with tag filter), segment CRUD, audit log, POST /flags/evaluate (multi-variate), SSE /flags/stream, legacy /flags/poll backward-compat
- seed.ts: updated to produce full FeatureFlagDoc with variations, version
- flags.test.ts: 63 tests — schema validation, evaluator engine, targeting rules, segments, prerequisites, scheduling, gradual rollouts, multi-variate, version comparison, deterministic hashing
- @bytelyst/events: added flag.created, flag.updated, flag.deleted, flag.kill_switch event types
- @bytelyst/feature-flag-client: multi-variate support (getValue, getEvaluation, getAllEvaluations), SSE streaming mode, onChange listeners, auth token injection
- event-dispatcher.ts + webhooks/types.ts: wired new flag events
2026-03-21 11:44:49 -07:00
saravanakumardb1
d11f84da5f
docs(e2ee): update roadmap — Sprint 4 complete
...
- 4.1.2: Swift Keychain key derivation ✓
- 4.2.2: Kotlin SecureStore key derivation ✓
- 4.3: @bytelyst/client-encrypt (22 tests) ✓
- 4.4.1: @bytelyst/secure-storage-web (16 tests) ✓
- 4.5: FlowMonk tasks.description encrypted (211 tests) ✓
- Only 4.4.2 (auth-client migration) deferred to Sprint 5
2026-03-21 11:23:26 -07:00
saravanakumardb1
ce08587680
feat(secure-storage-web): create @bytelyst/secure-storage-web — encrypted IndexedDB storage
...
- IndexedDB-backed key-value store with non-extractable AES-256-GCM CryptoKey
- Key material never leaves browser crypto subsystem
- API: set, get, delete, clear, has, keys — all async
- Namespace isolation for multi-app usage
- Falls back to localStorage when SubtleCrypto unavailable
- 16 Vitest tests (fake-indexeddb), all passing
- Add IndexedDB globals to root ESLint config
2026-03-21 11:19:19 -07:00
saravanakumardb1
1bce981f43
feat(client-encrypt): create @bytelyst/client-encrypt — Web Crypto API encryption
...
- AES-256-GCM via SubtleCrypto (browsers + React Native with polyfill)
- Wire-compatible EncryptedField with @bytelyst/field-encrypt (server) and
BLFieldEncrypt (Swift/Kotlin native SDKs)
- encryptField, decryptField, generateKey, keyFromHex, keyToHex
- PBKDF2 key derivation (600k iterations per OWASP 2023)
- isEncryptedField type guard, toHex/fromHex helpers
- 22 Vitest tests, all passing
- Add Web Crypto globals to root ESLint config
2026-03-21 11:15:27 -07:00
saravanakumardb1
9bb322113a
feat(native-sdks): add Keychain/SecureStore key derivation to BLFieldEncrypt
...
- Swift: getOrCreateKey(service:account:), loadKey(), deleteKey()
- Generates random AES-256 key, persists as hex in BLKeychain
- Subsequent calls return the same key for stable per-device DEK
- Kotlin: getOrCreateKey(store:account:), loadKey(), deleteKey()
- Generates random AES-256 key, persists as hex in BLSecureStore
- Uses EncryptedSharedPreferences for at-rest protection
- All existing tests still pass (21/21 Kotlin)
2026-03-21 11:10:02 -07:00
saravanakumardb1
e59dcdb9ac
docs(e2ee): update roadmap — Sprint 4.1/4.2 native SDKs complete
...
- Swift BLFieldEncrypt: 22 XCTest tests, CryptoKit AES-256-GCM
- Kotlin BLFieldEncrypt: 21/21 JUnit5 tests, javax.crypto AES-256-GCM
- Both wire-compatible with @bytelyst/field-encrypt EncryptedField JSON
2026-03-21 10:58:47 -07:00
saravanakumardb1
ee762b4612
feat(native-sdks): add BLFieldEncrypt to Swift + Kotlin platform SDKs
...
- Swift: BLFieldEncrypt.swift + BLFieldEncryptTests.swift (22 tests)
- CryptoKit AES-256-GCM, BLEncryptedField Codable struct
- encrypt/decrypt, AAD support, generateKey, keyFromHex, isEncrypted
- Data hex helpers (hexString, init?(hexString:))
- Kotlin: BLFieldEncrypt.kt + BLFieldEncryptTest.kt (21 tests)
- javax.crypto AES-256-GCM, BLEncryptedField data class
- encrypt/decrypt, AAD support, generateKey, keyFromHex, isEncrypted
- ByteArray/String hex extension functions
- Wire-compatible: same EncryptedField JSON structure as @bytelyst/field-encrypt (TS)
- { __encrypted: true, v: 1, alg: 'aes-256-gcm', ct, iv, tag, dekId }
- All hex-encoded, 12-byte IV, 16-byte auth tag
- Fix: ByteLystPlatform.kt getString() → read() (pre-existing compile error)
2026-03-21 10:58:02 -07:00
saravanakumardb1
b8ce14c259
test(broadcast-client): cover deep links and client
2026-03-21 10:56:49 -07:00
saravanakumardb1
5fe891f472
docs: update workspace + common-plat inventory with accurate scan data
...
- Package count: 53 → 58 (added backend-config, backend-flags,
backend-telemetry, fastify-auth, field-encrypt)
- New §2.6 Security section for @bytelyst/field-encrypt
- Product table: added Encrypted column (5 backends using field-encrypt)
- Test summary: replaced vague estimates with actual file counts (538 total)
- LocalMemGPT: fixed stack from 'React, Express' → 'Fastify 5, Next.js 16,
SQLite, Ollama' and added to product table (port 4019)
- Architecture diagram: 9→10 products, 53→58 packages, added LocalMemGPT
- Updated notes about SmartAuth (docs-only), temp_uxlab (empty)
- Bumped last-updated dates to 2026-03-21
2026-03-21 10:52:31 -07:00
saravanakumardb1
d6de30ee57
docs(devops): refresh backend audit baseline
2026-03-21 10:45:55 -07:00
saravanakumardb1
26283b402a
test(platform-service): cover ai diagnostics routes
2026-03-21 10:45:41 -07:00
saravanakumardb1
7c99f5a5fa
docs(e2ee): update roadmap — Phase 1 + Sprint 3 complete, 6 backends encrypted
...
- Sprint 1: @bytelyst/field-encrypt package — all items complete
- Sprint 2: LysnrAI + JarvisJr encrypted, MFA refactor deferred (data format risk)
- Sprint 3: NoteLett + NomGap + ActionTrail encrypted
- MindLyst deferred (KMP/Gradle repo, not Fastify backend pattern)
- Total: 6 product backends with field-level encryption, all tests green
2026-03-21 09:36:39 -07:00
saravanakumardb1
bb3f5385fc
feat(field-encrypt): create @bytelyst/field-encrypt package with AES-256-GCM envelope encryption
...
- 10 source files: types, aes-gcm, 3 key providers (memory/env/akv), envelope, key-cache, dek-store, guards, migration, factory
- 42 Vitest tests: AES-GCM roundtrips, tamper detection, unicode, 100KB payloads, key providers, DEK cache TTL/LRU, envelope lifecycle, migration (dry-run + idempotent), config validation
- AKV MEK creation script (scripts/create-encryption-keys.sh) for 10 product MEKs
- .env.example updated with FIELD_ENCRYPT_* vars
2026-03-21 09:18:10 -07:00
saravanakumardb1
8af997ba0f
docs(devops): update stale mywisprai/MyWisprAI branding across 5 AKV docs
...
- BytelystAI → ByteLyst in titles
- MyWisprAI → LysnrAI (legacy) for wispr-* secret references
- Added 'legacy resource name' annotations to Azure resource names
(kv-mywisprai, cosmos-mywisprai, etc. cannot be renamed)
- Updated dashboard paths (admin-web moved to dashboards/)
- Fixed telemetry role name: mywisprai-admin → lysnrai-admin
- Updated last-updated dates to 2026-03-21
Files: AZURE_KEY_VAULT_AND_SECRETS_ROTATION.md,
AZURE_PORTAL_SETUP.md, AZURE_RESOURCE_INVENTORY.md,
ENVIRONMENT_VARIABLES_AND_KEYVAULT_AUDIT.md,
END_TO_END_ENCRYPTION_ROADMAP.md
2026-03-21 09:15:30 -07:00
saravanakumardb1
5b2c6f2874
docs: add cross-repo automation playbook reference to AGENTS.md and CLAUDE.md
2026-03-21 09:11:48 -07:00
saravanakumardb1
2e35334e13
docs(devops): add coding agent automation playbook
...
- 11 cross-repo automation tasks for AI coding agents
- Workspace hygiene, test suites, coverage gaps, typecheck, deps, secrets
- Baseline test counts: 1,457 backend + 864 web = 2,321 total
- Priority matrix, quick-start commands, existing workflow references
2026-03-21 09:04:35 -07:00
saravanakumardb1
af5684587d
docs(devops): fix 14 bugs/gaps in E2EE design + roadmap after codebase review
2026-03-21 09:01:35 -07:00
saravanakumardb1
b6a1d637fb
docs(devops): add E2EE design document and implementation roadmap
2026-03-21 08:51:43 -07:00
saravanakumardb1
6856d23a2e
fix(swift-sdk): resolve BLAuditLogger + BLCrashReporter build errors in ByteLystPlatform
...
- BLAuditLogger is an enum (static API) — cannot be constructed; use .Type reference + configure()
- BLCrashReporter is @MainActor — defer construction to start() via Task { @MainActor }
2026-03-20 23:28:47 -07:00
saravanakumardb1
2eadf480dc
docs: Add post-implementation review fixes section to roadmap
...
Systematic review found 7 bugs across 7 repos:
1. LysnrAI Android: SettingsStore.kt incorrectly deleted (ada3d43)
2. Android kill switch: result.killed → result.disabled (3 repos)
3. Auth App iOS: BLKillSwitchClient.check() returns Void (215e7c9)
4. ChronoMind iOS: nonexistent BLKillSwitchResult (d3c3aff)
5. MindLyst iOS: KillSwitch + CrashReporter wrong API (cd78597)
6. JarvisJr iOS: KillSwitchResponse decoded 'killed' not 'disabled' (2a3cc7e)
7. NoteLett Mobile: createDiagnosticsClient doesn't exist (0b5c224)
2026-03-20 23:16:19 -07:00
saravanakumardb1
76e05f836a
docs: Update MOBILE_DRY_REFACTORING_ROADMAP with all 9 phases completed
...
Phases 1-9 complete with commit links and checked boxes:
- Phase 1: ChronoMind Android (2060a83)
- Phase 2: JarvisJr Android (336535a)
- Phase 3: FlowMonk Mobile RN (ce70d8c)
- Phase 4: LysnrAI Android (24a09a2) — 11 dead services deleted
- Phase 5: NomGap RN (63bd34b) — billingFetch replaced
- Phase 6: LysnrAI iOS (862e981) — 5 dead services deleted
- Phase 7: Auth App Android (5b65215) — telemetry/flags/killswitch added
- Phase 8: Auth App iOS (4a84050) — telemetry/flags/killswitch added
- Phase 9A: ChronoMind iOS (c328216) — Config + KillSwitch wrappers
- Phase 9B: NoteLett Mobile (c2d6414) — diagnostics-client added
- Phase 9C: MindLyst iOS (dce9e22) — Config + KillSwitch + CrashReporter
- Phase 9D: JarvisJr iOS — no changes needed (sync manager active)
Total: ~2,700 lines of dead code removed across 6 repos.
13 TODOs logged for build verification and deferred migrations.
2026-03-20 22:53:26 -07:00
saravanakumardb1
ac63116528
docs: mark Cross-Repo DRY Migration roadmap as COMPLETE (all 5 phases)
...
- Phase 4 (Web Client DRY) completed: createWebTelemetry + createWebDiagnostics
- 6 web apps migrated, all typechecks + tests pass
- product-config.ts standardization deferred (risk > ROI)
2026-03-20 18:58:31 -07:00
saravanakumardb1
b9e37bb8b4
feat(telemetry-client,diagnostics-client): add createWebTelemetry + createWebDiagnostics convenience factories
...
- telemetry-client: createWebTelemetry() wraps createTelemetryClient() with web defaults
- diagnostics-client: createWebDiagnostics() wraps DiagnosticsClient with install ID + web defaults
- Eliminates ~70 lines of boilerplate per web app
- 11/11 telemetry tests pass, 21/21 diagnostics tests pass
2026-03-20 18:47:18 -07:00
saravanakumardb1
470661e274
docs: mark Phase 3 complete, Phase 4 deferred in DRY migration roadmap
2026-03-20 08:06:37 -07:00
saravanakumardb1
0d8c0a5ffe
feat(backend-flags,backend-telemetry): create shared flag registry + telemetry buffer packages
...
- @bytelyst/backend-flags: createFlagRegistry() with defaults, 6 tests
- @bytelyst/backend-telemetry: createTelemetryBuffer() with enabled switch, 5 tests
2026-03-20 08:02:17 -07:00
saravanakumardb1
08661bbd97
feat(backend-config): create @bytelyst/backend-config package with shared Zod schema
...
- baseBackendConfigSchema: PORT, HOST, NODE_ENV, CORS_ORIGIN, SERVICE_NAME,
DB_PROVIDER, COSMOS_*, JWT_SECRET, PLATFORM_JWKS_URL
- parseBackendConfig() helper for env parsing
- Products extend via baseBackendConfigSchema.extend({...})
- 8 tests passing
2026-03-20 07:51:22 -07:00
saravanakumardb1
f5d64d58ce
docs: mark Phase 0+1 complete in DRY migration roadmap with commit hashes
2026-03-20 07:48:24 -07:00
saravanakumardb1
ea2cb4c0e6
fix(fastify-auth): support getter functions for jwtSecret/jwksUrl
...
Allows dynamic config resolution (e.g. test mocks that change config between calls).
Options can now be string | (() => string) for both jwtSecret and jwksUrl.
2026-03-20 07:38:26 -07:00
saravanakumardb1
f61a1f0b04
feat(fastify-auth): create @bytelyst/fastify-auth package with JWT auth + request context
...
- createAuthMiddleware(): RS256 JWKS + HS256 fallback (parameterized)
- createRequestContext(): productId validation + getUserId()
- Fastify request type augmentation for jwtPayload
- 15 tests passing
2026-03-20 07:30:53 -07:00
saravanakumardb1
d10322095a
docs: fix 10 inaccuracies in DRY audit + roadmap after thorough review
...
Verified claims against actual codebase. Key corrections:
Audit (CROSS_REPO_DRY_AUDIT.md):
- Fix #5 : all 9 repos already use @bytelyst/datastore — issue is only
DB_PROVIDER missing from config.ts in 3 older repos (not a full migration)
- Fix #6 : only 3 repos have product-config.ts (not 4) — NomGap was wrong
- Fix #11 : web telemetry.ts is in NomGap+NoteLett+ChronoMind+LysnrAI (not JarvisJr)
- Fix #12 : web diagnostics.ts includes LysnrAI user-dashboard-web (5 repos total)
- Fix auth.ts LOC: exactly 79 lines × 9 repos = 711 (was '60-90')
- Fix request-context.ts LOC: 30-49 lines range (was '~30-50')
- Fix package count: 50 packages (not 53)
- Add items 15-16: web auth.ts + billing-client.ts (noted as keep-as-is)
- Fix LOC math: ~2,700 total (was inflated ~4,200)
- Add cosmos-init.ts note (5 repos, product-specific, not consolidation candidates)
Roadmap (CROSS_REPO_DRY_MIGRATION_ROADMAP.md):
- Phase 0.2: 6 repos need product-config.ts (add NomGap)
- Phase 2.3: rewritten from 'migrate to datastore' to 'add DB_PROVIDER to config'
- Phase 4: add LysnrAI user-dashboard-web to affected repos, remove JarvisJr from telemetry
- Fix product-config.ts template path (was ../../../../, now ../../../ with depth note)
- Fix success metrics: packages 50→55, product-config 3→9, LOC ~1,760
- Fix overview table: Phase 2 name, Phase 4 repo count
2026-03-20 07:15:07 -07:00
saravanakumardb1
a769f671e2
docs: cross-repo DRY audit + end-to-end migration roadmap
...
- CROSS_REPO_DRY_AUDIT.md: identified 14 duplication patterns across
9 product backends + web clients (~4,200 LOC duplicated)
- CROSS_REPO_DRY_MIGRATION_ROADMAP.md: 5-phase execution plan with
concrete file lists, migration steps, verification checkpoints,
rollback strategy, and success metrics
- Phase 0: quick wins (delete errors.ts re-exports, standardize product-config)
- Phase 1: @bytelyst/fastify-auth (auth + request-context for 9 repos)
- Phase 2: @bytelyst/backend-config + datastore migration for 3 older repos
- Phase 3: backend-flags, backend-telemetry, domain-events (FlowMonk + ActionTrail)
- Phase 4: web client DRY (telemetry, diagnostics, product-config conveniences)
- Estimated: 11 days, 5 new packages, ~3,260 LOC eliminated
2026-03-20 07:04:46 -07:00
saravanakumardb1
10c288857d
fix(support-cases): prevent auto-triage from regressing case status
...
- Auto-triage previously always set status to 'triaged', even for cases
already in in_progress, escalated, or other later states
- Now only transitions to 'triaged' if case is still in 'open' state
- Cases in later states keep their current status (only priority + tags update)
- Added regression test for in_progress case
- 10 support-cases tests passing
2026-03-20 06:25:43 -07:00
saravanakumardb1
78cb958a6d
fix(ai-budgets): tighten rollover period filter to exclude stale entries
...
- Previous filter only checked e.recordedAt < currentPeriodStart
- Now also checks e.recordedAt >= prevPeriodStart (lower bound)
- Prevents entries from periods before the previous one from inflating
the spent amount, which would reduce the rollover incorrectly
- 12 ai-budgets tests passing
2026-03-20 06:24:13 -07:00
saravanakumardb1
f3a4d915f5
fix(support-cases): prevent crash when auto-triage encounters undefined tags
...
- supportCase.tags is optional in SupportCaseDoc schema
- Spreading undefined throws TypeError at runtime
- Fixed both [...supportCase.tags] and .includes() call with ?? [] fallback
- Added regression test for undefined tags case
- 9 support-cases tests passing
2026-03-20 06:23:34 -07:00
saravanakumardb1
63322a2d07
docs(roadmap): mark P3 Platform Deepening as complete with commit links
...
All 6 phases implemented, 58 new tests (1,278 → 1,336):
- Phase 1: 15e24e5 — Event Bus + Worker Runtime (15 tests)
- Phase 2: 84dc348 — Agent Runtime Orchestration (14 tests)
- Phase 3: 05acacd — AI Budget & Cost Governance (9 tests)
- Phase 4: 9758192 — AI Governance & Evals (8 tests)
- Phase 5: a060ee4 — Human Review Queue (7 tests)
- Phase 6: 0bbae1f — Support Case Management (5 tests)
2026-03-20 03:39:48 -07:00
saravanakumardb1
0bbae1f14e
feat(platform): Phase 6 — Support Case Management
...
- Case timeline: GET /support/cases/:id/timeline
- Merges case creation, notes, escalations chronologically
- SLA engine: GET /support/cases/:id/sla
- Priority-based SLA targets (critical=1h/4h, high=4h/24h, etc.)
- First-response and resolution breach detection
- Auto-triage: POST /support/cases/:id/auto-triage
- Keyword-based priority heuristics (outage→critical, error→high, etc.)
- Category detection (auth, billing, api)
- Deduped tag application
- Case metrics: GET /support/metrics
- Aggregates by status/priority/source
- Avg resolution hours, SLA breach count, compliance rate
- New repo function: listAllCases
- 1,336 tests passing (5 new)
2026-03-20 03:38:08 -07:00
saravanakumardb1
a060ee4496
feat(platform): Phase 5 — Human Review Queue
...
- Batch decisions: POST /reviews/batch-decision (up to 50 items)
- Parallel execution with allSettled, reports succeeded/failed counts
- Delegation: POST /reviews/:id/delegate
- Reassigns review with delegation metadata tracking
- Triggers notification to new assignee
- Auto-expiry: POST /reviews/expire
- Scans pending/assigned reviews past dueAt, marks expired
- Review stats: GET /reviews/stats
- Aggregates by status/priority/category, avg resolution time
- Computes pendingCount, overdueCount, avgResolutionHours
- New repo functions: listExpired, listAll
- 1,331 tests passing (7 new)
2026-03-20 03:33:55 -07:00
saravanakumardb1
9758192377
feat(platform): Phase 4 — AI Governance & Evals
...
- Run history: GET /agent-evals/suites/:id/runs with limit param
- Regression comparison: GET /agent-evals/suites/:id/regression
- Detects 5%+ score drop between consecutive runs
- Returns latest vs previous comparison + trend data
- Release gate check: GET /agent-evals/suites/:id/gate
- Checks if latest release-gate run passed threshold
- Agent compliance report: GET /agent-evals/agents/:agentId/report
- Aggregates pass rate, avg score, suite counts, recent runs
- Eval scheduling: POST /agent-evals/suites/:id/schedule
- Wires eval suite to job runner with cron expression
- New repo functions: listRunsBySuite, listRunsByAgent
- 1,324 tests passing (8 new)
2026-03-20 03:30:03 -07:00
saravanakumardb1
05acacd400
feat(platform): Phase 3 — AI Budget & Cost Governance
...
- Scope expansion: BudgetScopeTypeSchema now includes 'org' + 'workspace'
- Cost dashboard: GET /ai-budgets/costs with groupBy (model/agent/day/scope)
- Aggregates totalCostUsd, totalTokens, entryCount, breakdown
- Budget rollover: POST /ai-budgets/policies/:id/rollover
- Computes previous period remaining, creates rollover doc, adjusts budget
- GET /ai-budgets/policies/:id/rollovers for history
- Enforcement check: POST /ai-budgets/check (pre-flight, no spend recorded)
- Model allowlist + threshold evaluation, returns verdict + reasons
- New types: CostDashboardQuerySchema, BudgetRolloverSchema
- New repo functions: listAllSpendEntries, createRollover, listRollovers
- New Cosmos container: ai_budget_rollovers
- 1,316 tests passing (9 new)
2026-03-20 03:26:23 -07:00
saravanakumardb1
84dc348687
feat(platform): Phase 2 — Agent Runtime Orchestration
...
- New: agents/executor.ts — full agent execution engine
- Multi-step pipeline: prompt_assembly → tool_execution → finalize
- AbortController-based cancellation with in-memory tracking
- Token usage aggregation across tool calls
- Review-required tool gating (pauses run, returns review_required)
- Step event streaming for SSE consumers
- New: agents/tool-registry.ts — global tool registry
- Register/list/validate tools with risk levels + review flags
- New: agents/executor-routes.ts — 11 endpoints, 14 tests
- POST /agents/execute, POST /runs/:id/cancel
- GET /agents/active-runs, GET /runs/:id/children, GET /runs/:id/tree
- GET /agents/:id/metrics, GET /runs/:id/stream (SSE)
- GET /tools, POST /tools/validate, POST /agents/:id/schedule
- Enhanced: runs/repository.ts — added listChildRuns() for DAG query
- 1,307 tests passing (14 new)
2026-03-20 03:20:31 -07:00
saravanakumardb1
15e24e5710
feat(platform): Phase 1 — Durable Event Bus + Worker Runtime
...
- New module: event-subscriptions/ (types, repository, routes, 15 tests)
- Subscription CRUD: create/list/get/update/delete event subscriptions
- DLQ: list/retry/delete/purge dead-letter queue entries
- Event replay: POST /events/replay by topic + time range
- New lib: event-dispatcher.ts — subscription-driven dispatch with retry + DLQ
- New lib: event-store-bridge.ts — persistent event log for replay capability
- Worker runtime hardening (jobs/runner.ts):
- Concurrency limit (MAX_CONCURRENT_JOBS=5)
- Stuck-job recovery (10min threshold)
- Graceful shutdown (30s drain)
- Active job tracking + diagnostics (getActiveJobs/getActiveJobCount)
- Per-job dedup (skip if already running)
- Wired dispatcher + event-subscriptions into server.ts startup
- Cosmos containers: event_subscriptions, event_dlq, event_log
- 1,293 tests passing (15 new)
2026-03-20 03:12:54 -07:00
saravanakumardb1
17f5671595
docs(roadmap): P3 platform deepening roadmap — reviewed and audited
...
- 6 phases: Event Bus, Agent Runtime, AI Budget, AI Evals, Reviews, Support Cases
- 7-sprint mapping (14 weeks) with parallelization opportunities
- Cross-referenced all claims against actual codebase — 15 bugs/gaps found and fixed:
- DurableEventBus already exists in @bytelyst/events (not just in-memory)
- jobs/ has 25 tests (not 6), support-cases/ has 4 (not 3)
- ai-budgets already has verdict engine (252 LOC), alert generation, model allowlists
- BudgetScopeType only supports product+agent (not org/workspace yet)
- reviews/notifications.ts already has notifyReviewAssigned()
- Phase 2 effort overflowed (17d in 15d sprint) — rebalanced
- Test baseline corrected to 1,278 (not 1,308)
- Identified Cosmos QueueStore gap as critical path for Phase 1
- ai-diagnostics has 5,235 LOC but 0 tests — flagged as risk
- Estimated ~138 new tests bringing total to ~1,416
2026-03-20 01:20:49 -07:00
saravanakumardb1
9e510f7b49
test(scim): add 7 tests for stats, pause, resume, delete endpoints
...
- routes.test.ts: add mock functions for deleteConnector, getConnectorStats
- 7 new tests: stats endpoint, pause active, pause rejects non-active,
resume paused, resume rejects non-paused, delete paused, delete rejects active
- Total: 11 SCIM tests (was 4)
2026-03-20 01:06:07 -07:00
saravanakumardb1
28b6668fb1
fix(knowledge): align searchChunks scoring with routes, add 5 new tests
...
- repository.ts: searchChunks now includes tag matching (+2 per tag hit)
consistent with scoreChunk() in routes.ts
- routes.test.ts: add 5 new tests — stats endpoint, delete draft base,
reject non-draft delete, delete source, search chunks
- Total: 9 knowledge tests (was 4)
2026-03-20 01:04:32 -07:00