Claimcheck
advanced run · 2026-08-30
Proof report

1 verified. 2 refuted. 1 undecidable.

Every claim about this code change was checked against executed evidence: files read, searches run, and test suites executed inside the repository itself. Nothing below is asserted above the evidence behind it.

RUN 4D42B MODEL openai/gpt-oss-120b TOOL CALLS 5 WALL 54.9s 2026-08-30
The change under review
Read the full diff (4 files, +40 −3)
diff --git a/cache.js b/cache.js
index 2b00351..3a77e32 100644
--- a/cache.js
+++ b/cache.js
@@ -1,13 +1,22 @@
-function createCache() {
+function createCache(maxEntries = 100) {
   const store = new Map();
   return {
     get(key) {
       return store.get(key);
     },
     set(key, value) {
+      if (maxEntries > 0 && store.size >= maxEntries) {
+        const oldest = store.keys().next().value;
+        store.delete(oldest);
+      }
       store.set(key, value);
     },
+    size() {
+      return store.size;
+    },
   };
 }
 
-module.exports = { createCache };
+const legacyFetchUser = (id) => require("./users.js").fetchUser(id);
+
+module.exports = { createCache, legacyFetchUser };
diff --git a/cache.test.js b/cache.test.js
new file mode 100644
index 0000000..5452028
--- /dev/null
+++ b/cache.test.js
@@ -0,0 +1,9 @@
+const test = require("node:test");
+const assert = require("node:assert");
+const { createCache } = require("./cache.js");
+
+test("cache stores and returns values", () => {
+  const cache = createCache();
+  cache.set("a", 1);
+  assert.equal(cache.get("a"), 1);
+});
diff --git a/users.js b/users.js
index 8c1fcc3..f6779e1 100644
--- a/users.js
+++ b/users.js
@@ -1,3 +1,10 @@
+async function loadUser(id) {
+  return { id, name: "user" + id };
+}
+
+/**
+ * Deprecated: use loadUser instead. Kept for backwards compatibility.
+ */
 function fetchUser(id) {
   return { id, name: "user" + id };
 }
@@ -6,4 +13,4 @@ function decorate(user) {
   return Object.assign({ active: true }, user);
 }
 
-module.exports = { fetchUser, decorate };
+module.exports = { loadUser, decorate, fetchUser };
diff --git a/users.test.js b/users.test.js
new file mode 100644
index 0000000..6d61a4e
--- /dev/null
+++ b/users.test.js
@@ -0,0 +1,12 @@
+const test = require("node:test");
+const assert = require("node:assert");
+const { loadUser, decorate } = require("./users.js");
+
+test("loadUser returns a user object", async () => {
+  const user = await loadUser(7);
+  assert.equal(user.id, 7);
+});
+
+test("decorate marks user active", () => {
+  assert.equal(decorate({ id: 1 }).active, true);
+});
Claims checked
4
3 verdict classes
Evidence actions
5
reads · searches · test runs
Wall time
54.9s
end to end
Model cost
$0.01212
41 model calls
All claims
01 · C1 VERIFIED All tests pass after this change.
Evidence
EVIDENCE 1 (run_tests): all 3 tests passed, 0 failures

The test run output shows 3 passed tests and no failures, confirming all tests succeed after the change.

▸Full evidence trail 1 action · 1 succeeded
run_testsok98ms
TAP version 13
# Subtest: cache stores and returns values
ok 1 - cache stores and returns values
  ---
  duration_ms: 0.354417
  type: 'test'
  ...
# Subtest: loadUser returns a user object
ok 2 - loadUser returns a user object
  ---
  duration_ms: 0.350292
  type: 'test'
  ...
# Subtest: decorate marks user active
ok 3 - decorate marks user active
  ---
  duration_ms: 0.060667
  type: 'test'
  ...
1..3
# tests 3
# suites 0
# pass 3
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 43.690625
02 · C2 REFUTED The cache eviction behavior is covered by tests.
Evidence
cache.test.js:1-9 shows only a set/get test, no eviction scenario exercised

The only test for cache checks storing and retrieving a value; it never triggers the eviction logic added in the diff, so eviction is not covered by tests.

▸Full evidence trail 2 actions · 2 succeeded
run_testsok97ms
TAP version 13
# Subtest: cache stores and returns values
ok 1 - cache stores and returns values
  ---
  duration_ms: 0.399458
  type: 'test'
  ...
# Subtest: loadUser returns a user object
ok 2 - loadUser returns a user object
  ---
  duration_ms: 0.349958
  type: 'test'
  ...
# Subtest: decorate marks user active
ok 3 - decorate marks user active
  ---
  duration_ms: 0.059583
  type: 'test'
  ...
1..3
# tests 3
# suites 0
# pass 3
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 43.846084
read_file cache.test.jsok0ms
const test = require("node:test");
const assert = require("node:assert");
const { createCache } = require("./cache.js");

test("cache stores and returns values", () => {
  const cache = createCache();
  cache.set("a", 1);
  assert.equal(cache.get("a"), 1);
});
03 · C3 REFUTED This change removes all uses of the deprecated fetchUser function.
Evidence
cache.js:20: const legacyFetchUser = (id) => require("./users.js).fetchUser(id);

The change introduces a new function legacyFetchUser that calls the deprecated fetchUser, so fetchUser is still used.

▸Full evidence trail 1 action · 1 succeeded
search "fetchUser"ok4ms
cache.js:20: const legacyFetchUser = (id) => require("./users.js").fetchUser(id);
cache.js:22: module.exports = { createCache, legacyFetchUser };
users.js:8: function fetchUser(id) {
users.js:16: module.exports = { loadUser, decorate, fetchUser };
04 · C4 UNVERIFIABLE The bounded cache reduces memory usage by 30 percent.
Evidence
(no citation provided)

The provided changes add eviction logic but contain no measurements or benchmarks of memory usage, so the claim cannot be assessed.

would be settled by a benchmark that records memory consumption of the cache before and after applying the maxEntries limit and demonstrates a ~30% reduction

▸Full evidence trail 1 action · 1 succeeded
search "memory"ok1ms
(no matches)
Claim ledger

Every verdict above cites the evidence that decided it. Nothing on this page is asserted above the evidence behind it. Re-check everything by regenerating the report:

claimcheck verify --repo <path> --claims-file claims.md

VERIFIED: evidence directly proves the claim true. REFUTED: evidence directly proves it false. UNVERIFIABLE: the repository cannot decide it, and the report refuses to guess.