Update replit.md to document new stress test scripts and reorganize test descriptions.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 605cec52-e52a-4520-8af0-466d9c971344
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: dfcb132d-cfe2-469f-8659-b15111592030
Replit-Helium-Checkpoint-Created: true
Updates package.json to include `test:stress` scripts and adds an optional `stress-tests` job to the GitHub Actions CI workflow for concurrent write tests.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 605cec52-e52a-4520-8af0-466d9c971344
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: fde695de-720c-4bfb-b5f1-ea6710172a09
Replit-Helium-Checkpoint-Created: true
Update tests in `tests/reports.test.js` to assert the presence of specific fill colors for chart elements rather than exact positional coordinates, improving test robustness against minor rendering variations.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 605cec52-e52a-4520-8af0-466d9c971344
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 293138b2-b045-4ead-a559-d330e00bdd95
Replit-Helium-Checkpoint-Created: true
Fix logic in delay list initialization to correctly handle zero-value settings for authorization failure delays, and update test configurations to leverage this fix.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 605cec52-e52a-4520-8af0-466d9c971344
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: ee25d747-8c3a-444e-8dbf-e0229eee7d31
Replit-Helium-Checkpoint-Created: true
Adds new npm scripts for unit and integration tests with CI-specific environment configurations, updates the GitHub Actions workflow to use these scripts, and documents the new test organization and environment file usage in replit.md.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 21cb119b-47e0-4582-a80d-cddb4a3bfea7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: b072dbe3-29e5-41cf-86a1-00bea798d0e3
Replit-Helium-Checkpoint-Created: true
Refactors test scripts in package.json to separate unit and integration tests, updates CI environment variables for MongoDB, and modifies GitHub Actions workflow to run unit and integration tests in parallel and serially, respectively, optimizing test execution and resource utilization.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 21cb119b-47e0-4582-a80d-cddb4a3bfea7
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 8ffc8696-fdef-4ddf-960a-54d03ad00107
Replit-Helium-Checkpoint-Created: true
Updated test execution scripts in package.json to include parallel and fast test options. Converted several `beforeEach` hooks to `before` in test files for more efficient application setup. Added documentation for test optimizations.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 271f3cac-bab1-4e81-9982-f31b3b030aab
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: ac6eb857-be5a-454b-96cf-b9c4c57f058b
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ea4278b-5c6c-4065-9cb8-f1013771318d/271f3cac-bab1-4e81-9982-f31b3b030aab/69H2O1r
Replit-Helium-Checkpoint-Created: true
- devicestatus.js: Replace async.eachSeries + insertOne with insertMany
- entries.js: Replace forEach + updateOne with bulkWrite
- treatments.js: Replace async.eachSeries + replaceOne with bulkWrite
(preserves sequential fallback for preBolus treatments)
This improves performance for batch inserts and aligns with MongoDB
best practices per data-shape-requirements.md recommendations.
Update implementation plan and test cases to reflect that `ok` and `n` fields are optional in the response, aligning with Loop client behavior and clarifying middleware's legacy status.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e27dc73c-5668-4ca3-89c0-23127c7a1ac7
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: b6ab13d1-cae7-4d9d-9b92-bf3b582272ad
Replit-Helium-Checkpoint-Created: true
Update env.js to correctly parse PREDICTIONS_MAX_SIZE, allowing a value of 0 to disable truncation. Modify tests and documentation to reflect this change.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 81a6141f-c27c-4178-8cf3-6474e7b82918
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 92d3ef13-9728-43c6-8e8b-d435184fec07
Replit-Helium-Checkpoint-Created: true
Add a new test file `tests/flakiness-control.test.js` that allows configuring flakiness percentage via an environment variable `FLAKINESS_LEVEL`, supporting seeded randomness, logging, and timeout configurations for reproducible testing and validation of flakiness detection tools.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9d8f1c8c-dc6e-4e36-8757-3a13be266d60
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: c03b84ea-7ae9-4081-b484-6f10b690796e
Replit-Helium-Checkpoint-Created: true
Update test environment to use MONGO_POOL_SIZE=2 in my.test.env. This is the minimum pool size that handles concurrent operations without timeouts, improving test determinism. Production default remains 5.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cf276ff5-4001-4b44-93fe-7c9786ee4327
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: ccad3408-03dd-4bf8-9acb-b1d67ab9adcc
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ea4278b-5c6c-4065-9cb8-f1013771318d/cf276ff5-4001-4b44-93fe-7c9786ee4327/MVHBPJ5
Replit-Helium-Checkpoint-Created: true
Add details about a floating-point precision fix for boluswizardpreview.test.js and note an infrastructure issue with test process hangs during server teardown in replit.md.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cf276ff5-4001-4b44-93fe-7c9786ee4327
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 0e1264f9-9ae7-4b11-a0e7-658fe3d1f1ac
Replit-Helium-Checkpoint-Created: true
Update rounding logic in `lib/sandbox.js` to incorporate an epsilon value for enhanced precision, addressing potential floating-point errors in insulin calculations.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cf276ff5-4001-4b44-93fe-7c9786ee4327
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: f10d2278-3392-4fd0-ad73-36beee7aadb9
Replit-Helium-Checkpoint-Created: true
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
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
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
Increase test timeout to 30 seconds and optimize database cleanup by using deleteMany for entries and adding devicestatus cleanup in `api.deduplication.test.js`.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 400e0b24-3794-40cb-83de-0cc142f986c0
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 48378c97-a2ef-4f9f-8070-728091da5f11
Replit-Helium-Checkpoint-Created: true