Skip to content

Commit 92588fc

Browse files
QA: Fix L1 cache regression & perform lifecycle maintenance
- fixed `heavyComputation` returning false cache hits when called with `undefined` - bumped version to 1.1.26 - updated CHANGELOG.md and .jules/warden.md Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: shenald-dev <245350826+shenald-dev@users.noreply.github.com>
1 parent af6c01a commit 92588fc

5 files changed

Lines changed: 14 additions & 4 deletions

File tree

.jules/warden.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,9 @@ Observation / Pruned:
138138
Assessed BOLT's optimization moving the `/health` endpoint above `helmet()` and `cors()` middlewares, while manually setting `Content-Type`. This effectively prevents parsing and middleware overhead for frequent health check pings without compromising the expected response headers. Also bumped minor/patch versions via `npm update`. No dead code or unused files found, as previous optimizations have pruned effectively.
139139
Alignment / Deferred:
140140
Appended release notes for performance patch. Version bumped to 1.1.25.
141+
142+
2026-04-28 — Assessment & Lifecycle
143+
Observation / Pruned:
144+
Assessed JULES/BOLT's optimization adding an L1 cache to `heavyComputation`. Discovered a silent regression where initializing the cache variables with `undefined` caused false cache hits when the function was legitimately called with `undefined`. Fixed the regression by initializing the cache with a unique `Symbol('UNINITIALIZED')`. Ran tests to ensure no further issues. Checked for dead code and found none.
145+
Alignment / Deferred:
146+
Updated `CHANGELOG.md` with the fix details. Version bumped to 1.1.26.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [1.1.26] - 2026-04-28
2+
### Changed
3+
* **[Reliability]:** Fixed an issue in `heavyComputation` where the L1 cache was incorrectly returning false cache hits when `undefined` was passed as a parameter. The cache is now properly initialized with a unique `Symbol`. Zero dead code pruned.
4+
15
## v1.1.25 - 2026-04-27
26
### Changed
37
- **Performance:** Moved the `/health` endpoint above `helmet()` and `cors()` middlewares, saving significant CPU cycle overhead on load balancer pings by skipping unnecessary security header injections and CORS processing for this specific endpoint. No dead code pruned.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "one-api",
3-
"version": "1.1.25",
3+
"version": "1.1.26",
44
"description": "One API to rule them all. Unified gateway for 20+ LLM providers. OpenAI-compatible, single binary, zero config.",
55
"main": "src/index.js",
66
"scripts": {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ app.use((err, req, res, next) => {
154154
});
155155

156156
const computationCache = new Map();
157-
let lastIterations = undefined;
157+
let lastIterations = Symbol('UNINITIALIZED');
158158
let lastResult = undefined;
159159

160160
/**

0 commit comments

Comments
 (0)