Commit Graph
25 Commits
Author SHA1 Message Date
bewestandBen West c3c893334d Improve test performance by optimizing server boot handling
Refactor tests/api.shape-handling.test.js to use `before()` for server boot instead of `beforeEach()`, reducing boot overhead and improving test stability. Update docs/test-specs/flaky-tests.md and replit.md to reflect the fix and progress tracker.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: dd54303b-52a7-4c5b-9110-6cd8643ee3bb
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: fa6ecd04-4886-43f8-b6ed-5ca9e21eb746
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:46 -08:00
bewestandBen West 0db39ab5c7 Update documentation to reflect stable test suite status
Update docs/test-specs/flaky-tests.md and replit.md to accurately reflect the results of recent stress tests, noting that all completed runs passed and identifying a single slow test file that requires a longer timeout.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 400e0b24-3794-40cb-83de-0cc142f986c0
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: bfab6092-be80-4119-abc6-2df7a36dde30
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:46 -08:00
bewestandBen West 8d7c983bfc Update test documentation to reflect recent stability improvements
Update `docs/test-specs/flaky-tests.md` and `replit.md` to reflect that previously identified flaky tests are now stable, including details on the fix for `api.deduplication.test.js`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 400e0b24-3794-40cb-83de-0cc142f986c0
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 276f2ddc-a331-49cf-9da3-c3c6c3035794
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:46 -08:00
bewestandBen West d9f402f395 Add optional truncation for large prediction arrays in devicestatus
Introduces optional prediction array truncation for devicestatus documents via the PREDICTIONS_MAX_SIZE environment variable to manage MongoDB document size.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: daa945f9-0872-4250-9868-a1245067293b
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 3ecd5495-11e3-48af-b400-591200c40473
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:46 -08:00
bewestandBen West 4f445b87af Update documentation with observed test failures and analysis
Update the replit.md file to document observed test failures, including test file names, test names, and notes on potential causes, and to clarify the distinction between observed and consistent failures.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 0af6cbd9-213b-4067-92c7-061364010187
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: ad1d0f93-886b-404d-b868-e8a34324f278
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:46 -08:00
bewestandBen West f7607fe6e0 Update documentation with test findings and new testing commands
Add new sections to replit.md detailing known test issues, slow tests, and available test helpers, along with commands for isolation and timing-aware testing.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 0af6cbd9-213b-4067-92c7-061364010187
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: e31b94b0-d6a9-46b6-b500-c1d9ff5f43ae
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:46 -08:00
bewestandBen West bcc194ba01 Add a tool to detect and report on unreliable tests
Add a flaky test detection system that repeatedly runs tests, captures results, and generates reports to identify inconsistent test behavior.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9bea85b0-6b8f-4d55-b964-1080f91ee9a0
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 9dc019dc-2bb9-416a-80ad-527c2c506698
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:21 -08:00
bewestandBen West 14f92611dd Update documentation links and project references
Adjusted internal documentation links and updated references within various Markdown files to reflect a new directory structure for audit and meta documents.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 4dee684a-a4b9-4c32-a818-3a27dae1b027
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 971b8c75-c322-4ede-98ea-eb5ae31d4e5c
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:21 -08:00
bewestandBen West e774f766f9 Update documentation to reflect current project specifications and tests
Consolidate and update documentation references across various markdown files, renaming specifications and test files for clarity.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 4dee684a-a4b9-4c32-a818-3a27dae1b027
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 7cf50ce8-84d4-46a0-b9e6-9bbc663da8b8
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:21 -08:00
bewestandBen West ab8bb36eff Enhance deduplication tests with stricter timestamp and data matching
Improve assertions in `tests/api3.aaps-patterns.test.js` and update documentation in `replit.md` to reflect stricter checks for srvModified timestamps and exact data matching in deduplication tests.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 67c42e43-1630-438c-8341-81ea0fdac4c8
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: bad34835-bb02-4e4b-974b-a862572ac51b
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:21 -08:00
bewestandBen West 852aae5efc Add comprehensive tests for real-world AndroidAPS data handling scenarios
Introduce new test suite `tests/api3.aaps-patterns.test.js` and update `tests/concurrent-writes.test.js` to simulate AAPS sync catch-up with rapid sequential SMB and SGV POST requests, ensuring correct deduplication and data persistence for various AndroidAPS usage patterns.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2501b04e-77c8-4f06-a13c-75c232bafd47
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 804cc747-c899-430f-9181-96a22d4301a1
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ea4278b-5c6c-4065-9cb8-f1013771318d/2501b04e-77c8-4f06-a13c-75c232bafd47/Bc7Z6xs
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:21 -08:00
bewestandBen West 7a78966bc5 Add comprehensive tests for API input handling and concurrent writes
Add tests for API v1/v3 and WebSocket input handling, and improve concurrent write test coverage.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2501b04e-77c8-4f06-a13c-75c232bafd47
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: a5480f95-14f0-4de9-84d1-41c5d1a69aed
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ea4278b-5c6c-4065-9cb8-f1013771318d/2501b04e-77c8-4f06-a13c-75c232bafd47/rAsiAu1
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:21 -08:00
bewestandBen West 3062266ef4 Add comprehensive OIDC actor identity proposal and update documentation
Add a new OIDC Actor Identity proposal document and update architecture overview, authorization security spec, and replit.md to reference and prioritize OIDC integration.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 71600fc9-5175-4929-b903-5174a32258d2
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 4ccfdfed-74a5-4a42-97f1-13cf3f8352fe
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:21 -08:00
bewestandBen West 42f64fba75 Add comprehensive documentation for data schemas
Update replit.md to include new schema documentation for treatments and profiles, detailing field inventories, event types, timestamp semantics, client compatibility notes, and known bugs.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: f35580f1-0466-46a6-b245-5665d8e1c559
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 06320ff8-cffb-4a84-b19c-9263c5d08aa4
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:21 -08:00
bewestandBen West 06beef94ba Add project documentation progress tracker and update README
Create `docs/DOCUMENTATION-PROGRESS.md` to track requirements and test specification efforts, including progress, priorities, lessons learned, and guidance for collaborators. Update `replit.md` to reference this new progress tracker.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 055897c4-83a5-4136-93d8-ff61ec1a77a8
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 5af50b7b-7741-43cb-9f57-56a3635f46b7
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:21 -08:00
bewestandBen West f329ec084c Add comprehensive authorization and security documentation and test specifications
Introduces `authorization-security-spec.md` and `authorization-test-spec.md` to document API authentication requirements (API_SECRET, JWT, Shiro permissions, brute-force protection) and their corresponding test cases, including identification of coverage gaps.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 055897c4-83a5-4136-93d8-ff61ec1a77a8
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 48221946-c783-44b0-a3b8-0be79161ef82
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:21 -08:00
bewestandBen West 9ede11480b Update API documentation to reflect accurate data shape requirements
Introduce new documentation files for API v1 compatibility and data shape requirements, refining existing audit documents to detail input/output shape handling and test coverage.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fbbf36df-818c-4b8c-8760-4975515f38e6
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: e1680535-aae4-4ef6-a90a-fabeb9668ae7
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:21 -08:00
bewestandBen West 44409c5023 Improve handling of single and multiple data entries across the system
Refactor `devicestatus.js` to use `async.eachSeries` for sequential processing and update WebSocket `dbAdd` handler to process array inputs sequentially, ensuring correct multi-document write support.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fbbf36df-818c-4b8c-8760-4975515f38e6
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 522116f1-cf99-4504-9c93-bc47b4276585
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:21 -08:00
bewestandBen West 633ad8bd8e Update documentation to reflect authentication and security enhancements
Update architecture, security, and modernization documentation to clarify existing brute-force protection, introduce OIDC/OAuth2 integration plans, and address rate limiting gaps.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 6faed36e-345f-45eb-8006-45dc67e8451e
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 483af0ac-57e5-44ad-89c0-d2374643791a
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:13:13 -08:00
bewestandBen West 414bee681a Update documentation with system audit findings and roadmap
Add a comprehensive system audit documentation section to replit.md, detailing findings on rate limiting, dependencies, bundle size, and Node.js support, along with a list of 9 audit documents.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 6faed36e-345f-45eb-8006-45dc67e8451e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: a4473413-4cff-4847-b61c-6fc7e4d66b0a
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:13:13 -08:00
bewestandBen West 1172a5e1d6 Update proposal for modernizing testing and architecture
Revise testing modernization proposal to include UI modernization, architecture goals, and a three-track approach.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 6bd7e260-440b-4cf7-bd4f-6c49f415222f
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 6175529f-d563-44d9-a0d8-39ef3f387bd8
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:13:13 -08:00
bewestandBen West be57e3aaec Add testing modernization proposal to the documentation
Update replit.md to include a new proposal for modernizing test infrastructure, detailing a three-phase strategy and critical dependency updates.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 0dc64f83-dd07-4193-899d-2998f5eb61c8
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 3fb6e201-20e1-4478-9e20-72faa517ec04
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:13:13 -08:00
bewestandBen West 12c90cfc63 Add proposal for agentic collaboration control plane and data plane
Create a new RFC document and associated JSON schemas defining an agentic control plane for automated insulin delivery systems, including event envelopes, capabilities models, delivery tracking, and conflict rules.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 06715f81-f852-4156-8ab0-cf9e0aa3564d
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 010cdc4a-2c86-4d2e-9768-bf2769a89953
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:12:53 -08:00
bewestandBen West 920370fda1 Update project documentation with API details and configuration
Enhance `replit.md` to include comprehensive documentation on API endpoints (v1, v2, v3), authentication methods (API_SECRET, JWT), OpenAPI specs, Socket.IO channels, and environment variables.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 748e831e-92ae-4927-9569-47665f47f29c
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 759a1536-7b1b-4ce2-9972-168703ba4f7d
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ea4278b-5c6c-4065-9cb8-f1013771318d/748e831e-92ae-4927-9569-47665f47f29c/FO8cDm7
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:11:20 -08:00
bewestandBen West 0b411aed8b Update Nightscout to version 15.0.4 and configure for Replit
Update project documentation and startup script for Nightscout v15.0.4, including Replit specific configurations like INSECURE_USE_HTTP=true and webpack bundling.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 748e831e-92ae-4927-9569-47665f47f29c
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 6e1d3764-af75-4a2b-a75f-f7252955326d
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ea4278b-5c6c-4065-9cb8-f1013771318d/748e831e-92ae-4927-9569-47665f47f29c/FO8cDm7
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:11:12 -08:00