Nocturne
Making an API’s echo response describe the query it actually runs, with regression tests around the edge cases.
- Context
- Upstream contributions to nightscout/nocturne, merged in October 2026.
- Stack
- C#, .NET, API behavior and regression tests.
- Role
- Contributor: query parsing fix, API capability reporting correction and test-infrastructure cleanup.
- Status
- PR #2267 merged 20 Oct; PRs #2120 and #2163 merged 18 Oct 2026. Merge status is not a claim about a particular deployed release.

The mismatch
The /api/v1/times/echo endpoint exposes a request and its query interpretation. That interpretation needs to agree with the filters used by the time-query endpoints, rather than treating the raw request parameters as search conditions.
My change routes the echo query through the same BuildFind path as /times and /slice. It parses find[...] filters into the query while retaining the original request separately.
The regression coverage
PR #2267 includes regression coverage for equivalent entry queries, repeated parameters, regular expressions and unknown operators. The focus is consistency between query paths, including inputs that are easy to lose when translating a raw request.
This is not a credential-redaction fix: token and secret parameters remain in req.query. They are excluded from the parsed search conditions, not removed from the echoed request.
Related merged work
API capability reporting. PR #2120 corrects the status response to advertise existing v2 API support, with an updated test. It does not introduce a new v2 API.
Shared test infrastructure. PR #2163 reuses EchoingProblemDetailsFactory across three test classes. This is test-only cleanup, not a production behavior change.