6521 Commits
Author SHA1 Message Date
Ben WestandGitHub b03c604643 Merge pull request #8352 from nightscout/dev
release 15.0.4
2026-02-28 09:00:37 -08:00
Ben WestandGitHub 7ae17b13f5 Merge pull request #8433 from nightscout/test/node22-pr
Test/node22 pr
2026-02-27 15:07:57 -08:00
Ben WestandCopilot 0fb628e1c4 Update CI matrix to test Node 16, 20, 22
- Remove lts/* (redundant with explicit versions)
- Add Node 16 for backwards compatibility testing
- Skip Node 18 (flaky tests, will be fixed in MongoDB PR)
- Keep MongoDB 4.4, 5.0, 6.0 matrix

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 14:53:30 -08:00
Ben WestandCopilot e0cc9ff5df Relax Node version constraints to >=16.x
- Change engines.node from '^22.x || ^20.x' to '>=16.x'
- Change engines.npm from '>=10.x' to '>=8.x'
- Update runtime checkNodeVersion to allow Node 16+
- Creates overlap with previous release (^16.x || ^14.x)

This allows users on Node 16/18 to upgrade smoothly while
recommending Node 20 or 22 LTS for best support.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 14:52:56 -08:00
Ben West 019fa51cff Merge PR #8357 (Node 22 upgrade) 2026-02-27 14:06:32 -08:00
Ben WestandGitHub 535b50e9e0 Merge pull request #8432 from nightscout/wip/bewest/update-bridge-deps
Wip/bewest/update bridge deps
2026-02-27 14:03:03 -08:00
Ben WestandCopilot d81d6854c0 Update bridge dependencies to final deprecated versions
- share2nightscout-bridge: 0.2.9 → 0.2.10 (Node 22 support)
- minimed-connect-to-nightscout: 1.5.5 → 1.5.6 (Node 22 support)

Both packages now allow Node 18/20/22+ in their engines field.
This is a prerequisite for the Node 22 upgrade (PR #8357).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 13:36:08 -08:00
Ben WestandCopilot 6a48ea89cf Update bridge dependencies to final deprecated versions
- share2nightscout-bridge: 0.2.9 → 0.2.10 (Node 22 support)
- minimed-connect-to-nightscout: 1.5.5 → 1.5.6 (Node 22 support)

Both packages now allow Node 18/20/22+ in their engines field.
This is a prerequisite for the Node 22 upgrade (PR #8357).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 13:16:04 -08:00
Ben West f441d6a6fa ensure AUTH_FAIL_DELAY for ci 2026-01-19 19:07:19 -08:00
Ben West 93945b749e ensure auth tests have a proper delay set
It needs a small delay to test with.
2026-01-19 18:50:11 -08:00
Ben West 7a2d345491 move workflow out of way 2026-01-20 02:40:50 +00:00
bewest 58ad1d7b69 Update project documentation to reflect recent changes
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
2026-01-20 02:14:59 +00:00
bewest 6e4ff939f8 Add optional concurrent write stress tests to CI workflow
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
2026-01-20 02:14:20 +00:00
bewest ba95c1e054 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 605cec52-e52a-4520-8af0-466d9c971344
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 052f1302-557b-4bfe-a808-973d737e88b1
Replit-Helium-Checkpoint-Created: true
2026-01-20 02:12:03 +00:00
bewest 17d3a74f91 Saved progress at the end of the loop
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 605cec52-e52a-4520-8af0-466d9c971344
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: b141af6b-dc36-41d1-9b8c-70b60b2798e6
Replit-Helium-Checkpoint-Created: true
2026-01-20 02:05:46 +00:00
bewest 82708a5025 Make report tests less brittle by checking for colors instead of exact coordinates
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
2026-01-20 02:05:33 +00:00
bewest 6d34a11686 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 605cec52-e52a-4520-8af0-466d9c971344
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 82b98339-21a6-4b84-abd0-071cc5861ef7
Replit-Helium-Checkpoint-Created: true
2026-01-20 02:02:16 +00:00
bewest 27b7f68ba6 Saved progress at the end of the loop
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 605cec52-e52a-4520-8af0-466d9c971344
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: f9cead8e-29fd-4580-8c21-fa2939d21355
Replit-Helium-Checkpoint-Created: true
2026-01-20 01:49:07 +00:00
bewest a55df96d80 Improve security test performance by fixing authorization delay calculation
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
2026-01-20 01:48:56 +00:00
bewest d878f2938f Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 605cec52-e52a-4520-8af0-466d9c971344
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 1d9cf633-408c-4a69-afac-a7479a7b88ef
Replit-Helium-Checkpoint-Created: true
2026-01-20 01:46:33 +00:00
bewest a12f7296ee Organize tests for efficient execution and update CI configurations
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
2026-01-20 01:03:40 +00:00
bewest 71c89f40d3 Organize tests for better execution and resource management
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
2026-01-20 01:01:01 +00:00
bewest e07ae6a1b3 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 21cb119b-47e0-4582-a80d-cddb4a3bfea7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: d840a812-e929-414f-855e-cdada4a576e7
Replit-Helium-Checkpoint-Created: true
2026-01-20 00:48:38 +00:00
bewest 875d8542c1 Improve test stability by increasing MongoDB connection pool size
Update `replit.md` to document the increase of `MONGO_POOL_SIZE` from 2 to 5 in the test environment configuration to enhance stability during parallel test execution.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 271f3cac-bab1-4e81-9982-f31b3b030aab
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 260ef33f-bb92-40d0-82ef-652c94ce7f29
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
2026-01-19 23:02:42 +00:00
bewest 65170b6b48 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 271f3cac-bab1-4e81-9982-f31b3b030aab
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: e9c0db36-08f4-4782-ab0d-e99bf0fb88ee
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
2026-01-19 22:50:08 +00:00
bewest 6017a858f0 Saved progress at the end of the loop
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 271f3cac-bab1-4e81-9982-f31b3b030aab
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 7d929407-4305-4d19-9d53-83f9e6bda8ce
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
2026-01-19 22:47:40 +00:00
bewest cface54888 Optimize test suite by converting beforeEach to before and adding parallel testing scripts
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
2026-01-19 22:47:02 +00:00
bewest 97a720f166 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 271f3cac-bab1-4e81-9982-f31b3b030aab
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 2a71f849-1004-47bf-93fd-6f098d1b2123
Replit-Helium-Checkpoint-Created: true
2026-01-19 22:38:15 +00:00
Ben West 231e50818a remov attached assets 2026-01-19 13:53:27 -08:00
Ben West 273182971b ignore attached_assets 2026-01-19 13:53:03 -08:00
Ben West 367ebdacd3 docs: update MongoDB modernization docs to reflect bulkWrite completion 2026-01-19 13:49:36 -08:00
Ben West 9318a577b5 refactor: use insertMany/bulkWrite for batch MongoDB operations
- 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.
2026-01-19 13:49:36 -08:00
Ben West e113178680 Checkpoint from Copilot CLI for coding agent session 2026-01-19 13:49:29 -08:00
bewestandBen West 2478c9057d Saved progress at the end of the loop
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e27dc73c-5668-4ca3-89c0-23127c7a1ac7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 5c6de3e3-d89b-48fa-8cda-b18aae52c4ec
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:15:09 -08:00
bewestandBen West f0b8520744 Clarify response format requirements and optional middleware
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
2026-01-19 13:15:09 -08:00
bewestandBen West 238684c4b4 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e27dc73c-5668-4ca3-89c0-23127c7a1ac7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 492e4fdb-6693-46d2-9ae4-9c27f74b467e
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:15:09 -08:00
bewestandBen West 3dca05d69d Saved progress at the end of the loop
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 81a6141f-c27c-4178-8cf3-6474e7b82918
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: af5b8c3c-94ec-4b5b-8195-b85e49f1eec6
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:15:09 -08:00
bewestandBen West 7ffc4da46e Allow disabling prediction array truncation by setting the maximum size to zero
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
2026-01-19 13:15:09 -08:00
bewestandBen West c4529ac222 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 81a6141f-c27c-4178-8cf3-6474e7b82918
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 72c66b6d-24ed-4e3c-a659-4f8c47436ccb
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:15:09 -08:00
bewestandBen West 5e896faaac Saved progress at the end of the loop
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9d8f1c8c-dc6e-4e36-8757-3a13be266d60
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 85d25b70-8f1b-4e88-8621-6b7bdd20a891
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:15:09 -08:00
bewestandBen West 6d98d25158 Add controllable flaky tests for validating detection tools
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
2026-01-19 13:15:09 -08:00
bewestandBen West 5a12b7e6f9 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9d8f1c8c-dc6e-4e36-8757-3a13be266d60
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 4a6144fa-1d45-430b-a847-b512434b0714
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:15:09 -08:00
bewestandBen West cab5a01bae Saved progress at the end of the loop
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cf276ff5-4001-4b44-93fe-7c9786ee4327
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 6fc17817-630e-4969-90c0-6256457d8ebc
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
2026-01-19 13:15:09 -08:00
bewestandBen West 46bd7c559b Optimize test environment to use a smaller MongoDB connection pool size
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
2026-01-19 13:15:09 -08:00
bewestandBen West 295e1c2c5d Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cf276ff5-4001-4b44-93fe-7c9786ee4327
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 76d7689b-8457-4df6-ba0c-1e1c23a4f238
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
2026-01-19 13:15:09 -08:00
bewestandBen West 9a54c62265 Saved progress at the end of the loop
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cf276ff5-4001-4b44-93fe-7c9786ee4327
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: b7fe7ccf-12bf-4c0d-827b-7095d82780ce
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
2026-01-19 13:15:09 -08:00
bewestandBen West d4d2574307 Improve database connection management and add configurability
Introduce new environment variables for MongoDB connection pool configuration (pool size, min pool size, max idle time) and add related tests and documentation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cf276ff5-4001-4b44-93fe-7c9786ee4327
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 6d2a0738-a5a9-4167-a04b-df474a95be16
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
2026-01-19 13:15:09 -08:00
bewestandBen West 59df68c9f5 Transitioned from Plan to Build mode
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cf276ff5-4001-4b44-93fe-7c9786ee4327
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 422c7bc0-11d8-410a-8551-ce894be78bb4
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:15:09 -08:00
bewestandBen West 289649b52f Saved progress at the end of the loop
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cf276ff5-4001-4b44-93fe-7c9786ee4327
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 00590cbc-ad71-4414-a44b-31e663f3e5e7
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:15:09 -08:00
bewestandBen West 7fe2775f61 Update documentation with recent test stability improvements
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
2026-01-19 13:15:09 -08:00