From 8408e8d85b94aa0e79e22b3ded57875abb682857 Mon Sep 17 00:00:00 2001 From: Rohit Ghumare Date: Thu, 12 Nov 2026 18:28:53 +0530 Subject: [PATCH 1/2] fix(release-gate): force the dead-letter capture failure without the session cap The deadletter scenario made the third capture fail by starting with MAX_OBS_PER_SESSION=2. Since #1174 the cap evicts the lowest-value observation instead of refusing the write, so the capture succeeded, no dead letter appeared and the scenario timed out on every platform. mem::observe now rejects a capture whose data contains the value of AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE. The variable is unset in normal use, so nothing changes for users. The gate sets it to the third marker, restarts without it, and the retry recovers the capture as before. Signed-off-by: Rohit Ghumare --- scripts/release-gate/run.mjs | 2 +- src/cli/compose-project.ts | 2 +- src/functions/observe.ts | 5 +++++ test/auto-compress.test.ts | 17 +++++++++++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/scripts/release-gate/run.mjs b/scripts/release-gate/run.mjs index 59b2c3d314..424f2ff671 100644 --- a/scripts/release-gate/run.mjs +++ b/scripts/release-gate/run.mjs @@ -1180,9 +1180,9 @@ async function main() { // Agentmemory capture inbox/dead-letter recovery is independent of queue workers. await ensureUp(instA); await instA.stop(); - await instA.start({ MAX_OBS_PER_SESSION: "2" }); const sid = `gate-dead-${randomBytes(4).toString("hex")}`; const ms = [marker("onyx"), marker("opal"), marker("quartz")]; + await instA.start({ AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE: ms[2] }); for (const m of ms) await instA.hook("PostToolUse", instA.toolEvent(sid, m)); const dead = await poll("a dead letter for the failed capture", async () => { const c = await instA.capture("?status=dead"); diff --git a/src/cli/compose-project.ts b/src/cli/compose-project.ts index cd684ae8d2..78f6978c48 100644 --- a/src/cli/compose-project.ts +++ b/src/cli/compose-project.ts @@ -72,7 +72,7 @@ const AGENTMEMORY_WORKER_ENV_ALLOWLIST = new Set([ "CLAUDE_MEMORY_LINE_BUDGET", "CLAUDE_PROJECT_PATH", "AGENTMEMORY_SUPPRESS_COST_WARNING", "FALLBACK_PROVIDERS", "OPENAI_API_VERSION", "OPENAI_REASONING_EFFORT", "OPENAI_TIMEOUT_MS", "MINIMAX_BASE_URL", "OPENROUTER_EMBEDDING_MODEL", "OPENROUTER_EMBEDDING_DIMENSIONS", - "AGENTMEMORY_LLM_TIMEOUT_MS", "AGENTMEMORY_CAPTURE_MAX_ATTEMPTS", + "AGENTMEMORY_LLM_TIMEOUT_MS", "AGENTMEMORY_CAPTURE_MAX_ATTEMPTS", "AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE", "AGENTMEMORY_CAPTURE_RETRY_INTERVAL_MS", "AGENTMEMORY_CAPTURE_DEDUP_HOURS", "AGENTMEMORY_CAPTURE_INBOX_MAX", "AGENTMEMORY_CAPTURE_DEAD_MAX", "AGENTMEMORY_CAPTURE_EVENTS_MAX", "AGENTMEMORY_CAPTURE_SPOOL", "AGENTMEMORY_CAPTURE_SPOOL_DIR", diff --git a/src/functions/observe.ts b/src/functions/observe.ts index 82022e86cd..c292c3a70d 100644 --- a/src/functions/observe.ts +++ b/src/functions/observe.ts @@ -163,6 +163,11 @@ export function registerObserveFunction( }; } + const gateFailMarker = process.env["AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE"]; + if (gateFailMarker && JSON.stringify(payload.data ?? null).includes(gateFailMarker)) { + return { success: false, error: "release gate: AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE rejected this capture" }; + } + const durable = typeof payload.observationId === "string" && /^obs_[A-Za-z0-9_]{8,80}$/.test(payload.observationId); const obsId = durable ? payload.observationId! : generateId("obs"); diff --git a/test/auto-compress.test.ts b/test/auto-compress.test.ts index 8118f5c945..e774ef168d 100644 --- a/test/auto-compress.test.ts +++ b/test/auto-compress.test.ts @@ -103,6 +103,23 @@ describe("mem::observe auto-compress gate", () => { expect(compressCalls).toHaveLength(0); }); + it("AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE rejects only captures that contain the marker", async () => { + process.env["AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE"] = "gate-marker-x"; + try { + const { registerObserveFunction } = await import("../src/functions/observe.js"); + const sdk = mockSdk(); + const kv = mockKV(); + registerObserveFunction(sdk as never, kv as never); + const rejected = await sdk.trigger("mem::observe", validPayload({ data: { tool_name: "Bash", tool_output: "ran gate-marker-x" } })); + expect(rejected).toMatchObject({ success: false }); + expect(kv.store.get("mem:obs:ses_test")?.size ?? 0).toBe(0); + const kept = (await sdk.trigger("mem::observe", validPayload())) as { observationId?: string }; + expect(kept.observationId).toMatch(/^obs_/); + } finally { + delete process.env["AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE"]; + } + }); + it("default: stores a synthetic CompressedObservation with the raw-derived fields", async () => { const { registerObserveFunction } = await import( "../src/functions/observe.js" From 282b3bef4e50caca65c65ab31b3d116709e3e435 Mon Sep 17 00:00:00 2001 From: Rohit Ghumare Date: Thu, 12 Nov 2026 18:37:39 +0530 Subject: [PATCH 2/2] fix(release-gate): mark the dead-letter switch as internal and sync docs The switch is for the release gate only, so it now ends in two underscores like AGENTMEMORY_MCP_STDIO__. The skill reference generator skips such internal markers, so the variable does not appear as a user setting and skills:check passes. Documented counts are re-synced. Signed-off-by: Rohit Ghumare --- AGENTS.md | 4 ++-- README.md | 4 ++-- READMEs/README.ar-SA.md | 4 ++-- READMEs/README.bn-BD.md | 4 ++-- READMEs/README.cs-CZ.md | 4 ++-- READMEs/README.da-DK.md | 4 ++-- READMEs/README.de-DE.md | 4 ++-- READMEs/README.el-GR.md | 4 ++-- READMEs/README.es-ES.md | 4 ++-- READMEs/README.fi-FI.md | 4 ++-- READMEs/README.fr-FR.md | 4 ++-- READMEs/README.he-IL.md | 4 ++-- READMEs/README.hi-IN.md | 4 ++-- READMEs/README.hu-HU.md | 4 ++-- READMEs/README.id-ID.md | 4 ++-- READMEs/README.it-IT.md | 4 ++-- READMEs/README.ja-JP.md | 4 ++-- READMEs/README.ko-KR.md | 4 ++-- READMEs/README.nb-NO.md | 4 ++-- READMEs/README.nl-NL.md | 4 ++-- READMEs/README.pl-PL.md | 4 ++-- READMEs/README.pt-BR.md | 4 ++-- READMEs/README.pt-PT.md | 4 ++-- READMEs/README.ro-RO.md | 4 ++-- READMEs/README.ru-RU.md | 4 ++-- READMEs/README.sv-SE.md | 4 ++-- READMEs/README.th-TH.md | 4 ++-- READMEs/README.tl-PH.md | 4 ++-- READMEs/README.tr-TR.md | 4 ++-- READMEs/README.uk-UA.md | 4 ++-- READMEs/README.ur-PK.md | 4 ++-- READMEs/README.vi-VN.md | 4 ++-- READMEs/README.zh-CN.md | 4 ++-- READMEs/README.zh-TW.md | 4 ++-- assets/tags/light/stat-tests.svg | 4 ++-- assets/tags/stat-tests.svg | 4 ++-- scripts/docs-sync.state.json | 6 +++--- scripts/release-gate/run.mjs | 2 +- src/cli/compose-project.ts | 2 +- src/functions/observe.ts | 4 ++-- test/auto-compress.test.ts | 6 +++--- 41 files changed, 82 insertions(+), 82 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 81b4eed6fa..c2e9d97cc5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -101,7 +101,7 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import). ## Testing -- Before every commit run, in order: `npm run build`, `npm run skills:gen`, `npm run docs:sync`, `npm run skills:check`, `npm test` (4,800+ tests). Commit anything the generators changed. CI runs the same build, skills check and tests. +- Before every commit run, in order: `npm run build`, `npm run skills:gen`, `npm run docs:sync`, `npm run skills:check`, `npm test` (4,900+ tests). Commit anything the generators changed. CI runs the same build, skills check and tests. - Before any npm publish: `npm run release:gate` must pass. It installs the packed tarballs into a clean home and runs capture, recovery, restart, export/import, MCP and status checks against the installed CLI (see CONTRIBUTING.md, Release process) - Mock pattern: `vi.mock("iii-sdk")` with mock `sdk.trigger`, `kv.get/set/list` - Test files go in `test/` with `.test.ts` extension @@ -114,4 +114,4 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import). - 6 MCP resources, 3 MCP prompts - 12 hooks, 17 skills - 322+ iii functions -- 4,800+ tests +- 4,900+ tests diff --git a/README.md b/README.md index 2d8fe9476a..e12cba755a 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ 54 MCP tools 12 auto hooks 0 external DBs - 4,800+ tests passing + 4,900+ tests passing

@@ -1313,7 +1313,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.ar-SA.md b/READMEs/README.ar-SA.md index 17ab19bd9a..de713f7766 100644 --- a/READMEs/README.ar-SA.md +++ b/READMEs/README.ar-SA.md @@ -71,7 +71,7 @@ 54 MCP tools 12 auto hooks 0 external DBs - 4,800+ tests passing + 4,900+ tests passing

@@ -1244,7 +1244,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.bn-BD.md b/READMEs/README.bn-BD.md index 72fb4d4af9..c878a5d8c8 100644 --- a/READMEs/README.bn-BD.md +++ b/READMEs/README.bn-BD.md @@ -69,7 +69,7 @@ 54 MCP টুল 12 অটো হুক 0 এক্সটার্নাল ডিবি - 4,800+ টেস্ট পাস + 4,900+ টেস্ট পাস

@@ -1257,7 +1257,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.cs-CZ.md b/READMEs/README.cs-CZ.md index f5e711dc12..05d3df1055 100644 --- a/READMEs/README.cs-CZ.md +++ b/READMEs/README.cs-CZ.md @@ -69,7 +69,7 @@ 54 MCP nástrojů 12 automatických hooks 0 externích databází - 4,800+ testů úspěšně proběhlo + 4,900+ testů úspěšně proběhlo

@@ -1243,7 +1243,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.da-DK.md b/READMEs/README.da-DK.md index 84b7ab09fa..62c1373564 100644 --- a/READMEs/README.da-DK.md +++ b/READMEs/README.da-DK.md @@ -69,7 +69,7 @@ 54 MCP-værktøjer 12 automatiske hooks 0 eksterne databaser - 4,800+ beståede tests + 4,900+ beståede tests

@@ -1251,7 +1251,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.de-DE.md b/READMEs/README.de-DE.md index b3cc67f911..60cbd1df16 100644 --- a/READMEs/README.de-DE.md +++ b/READMEs/README.de-DE.md @@ -69,7 +69,7 @@ 54 MCP-Tools 12 Auto-Hooks 0 externe DBs - 4,800+ bestandene Tests + 4,900+ bestandene Tests

@@ -1249,7 +1249,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.el-GR.md b/READMEs/README.el-GR.md index d129d1da96..4962170a4c 100644 --- a/READMEs/README.el-GR.md +++ b/READMEs/README.el-GR.md @@ -69,7 +69,7 @@ 54 εργαλεία MCP 12 αυτόματα hooks 0 εξωτερικές βάσεις δεδομένων - 4,800+ επιτυχημένες δοκιμές + 4,900+ επιτυχημένες δοκιμές

@@ -1243,7 +1243,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.es-ES.md b/READMEs/README.es-ES.md index 28cc4afeee..71d33dbb10 100644 --- a/READMEs/README.es-ES.md +++ b/READMEs/README.es-ES.md @@ -69,7 +69,7 @@ 54 tools MCP 12 hooks automáticos 0 bases de datos externas - 4,800+ tests superados + 4,900+ tests superados

@@ -1245,7 +1245,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.fi-FI.md b/READMEs/README.fi-FI.md index f1cec636e1..175efd508c 100644 --- a/READMEs/README.fi-FI.md +++ b/READMEs/README.fi-FI.md @@ -69,7 +69,7 @@ 54 MCP-työkalua 12 automaattista hookia 0 ulkoista tietokantaa - 4,800+ testiä läpäisty + 4,900+ testiä läpäisty

@@ -1243,7 +1243,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.fr-FR.md b/READMEs/README.fr-FR.md index 317ed9a426..c898e17a93 100644 --- a/READMEs/README.fr-FR.md +++ b/READMEs/README.fr-FR.md @@ -69,7 +69,7 @@ 54 MCP tools 12 auto hooks 0 external DBs - 4,800+ tests passing + 4,900+ tests passing

@@ -1252,7 +1252,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.he-IL.md b/READMEs/README.he-IL.md index 3db03a6560..0586f40d7b 100644 --- a/READMEs/README.he-IL.md +++ b/READMEs/README.he-IL.md @@ -71,7 +71,7 @@ 54 כלי MCP 12 hooks אוטומטיים 0 מסדי נתונים חיצוניים - 4,800+ בדיקות עוברות + 4,900+ בדיקות עוברות

@@ -1244,7 +1244,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.hi-IN.md b/READMEs/README.hi-IN.md index 4e074331ad..9185983cda 100644 --- a/READMEs/README.hi-IN.md +++ b/READMEs/README.hi-IN.md @@ -69,7 +69,7 @@ 54 MCP tools 12 auto hooks 0 external DBs - 4,800+ tests passing + 4,900+ tests passing

@@ -1258,7 +1258,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.hu-HU.md b/READMEs/README.hu-HU.md index 92a7e06148..b1fcd2e91e 100644 --- a/READMEs/README.hu-HU.md +++ b/READMEs/README.hu-HU.md @@ -69,7 +69,7 @@ 54 MCP eszköz 12 automatikus hook 0 külső adatbázis - 4,800+ sikeres teszt + 4,900+ sikeres teszt

@@ -1241,7 +1241,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.id-ID.md b/READMEs/README.id-ID.md index 64b78db504..6be8f90a25 100644 --- a/READMEs/README.id-ID.md +++ b/READMEs/README.id-ID.md @@ -69,7 +69,7 @@ 54 tool MCP 12 hook otomatis 0 DB eksternal - 4,800+ pengujian lolos + 4,900+ pengujian lolos

@@ -1258,7 +1258,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.it-IT.md b/READMEs/README.it-IT.md index dbdedec687..341799588d 100644 --- a/READMEs/README.it-IT.md +++ b/READMEs/README.it-IT.md @@ -69,7 +69,7 @@ 54 MCP tools 12 auto hooks 0 external DBs - 4,800+ tests passing + 4,900+ tests passing

@@ -1251,7 +1251,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.ja-JP.md b/READMEs/README.ja-JP.md index 46de85bb2e..43913c0fd7 100644 --- a/READMEs/README.ja-JP.md +++ b/READMEs/README.ja-JP.md @@ -69,7 +69,7 @@ 54 MCP ツール 12 自動 hooks 外部 DB 0 個 - 4,800+ 件のテストが成功 + 4,900+ 件のテストが成功

@@ -1257,7 +1257,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.ko-KR.md b/READMEs/README.ko-KR.md index aac97124a3..a70c02477a 100644 --- a/READMEs/README.ko-KR.md +++ b/READMEs/README.ko-KR.md @@ -69,7 +69,7 @@ 54 MCP tools 12 auto hooks 0 external DBs - 4,800+ tests passing + 4,900+ tests passing

@@ -1256,7 +1256,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.nb-NO.md b/READMEs/README.nb-NO.md index 3540b1d50b..9cce02dcf8 100644 --- a/READMEs/README.nb-NO.md +++ b/READMEs/README.nb-NO.md @@ -69,7 +69,7 @@ 54 MCP tools 12 auto hooks 0 external DBs - 4,800+ tests passing + 4,900+ tests passing

@@ -1249,7 +1249,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.nl-NL.md b/READMEs/README.nl-NL.md index 9fe0188c54..6af924de0f 100644 --- a/READMEs/README.nl-NL.md +++ b/READMEs/README.nl-NL.md @@ -69,7 +69,7 @@ 54 MCP tools 12 auto hooks 0 external DBs - 4,800+ tests passing + 4,900+ tests passing

@@ -1245,7 +1245,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.pl-PL.md b/READMEs/README.pl-PL.md index 9faffcbeed..098d6dbdd2 100644 --- a/READMEs/README.pl-PL.md +++ b/READMEs/README.pl-PL.md @@ -69,7 +69,7 @@ 54 narzędzia MCP 12 automatycznych hooków 0 zewnętrznych baz danych - 4,800+ zaliczonych testów + 4,900+ zaliczonych testów

@@ -1241,7 +1241,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.pt-BR.md b/READMEs/README.pt-BR.md index 8162bee293..fee630c5cd 100644 --- a/READMEs/README.pt-BR.md +++ b/READMEs/README.pt-BR.md @@ -69,7 +69,7 @@ 54 MCP tools 12 auto hooks 0 external DBs - 4,800+ tests passing + 4,900+ tests passing

@@ -1249,7 +1249,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.pt-PT.md b/READMEs/README.pt-PT.md index 9cc009a92c..91747393a5 100644 --- a/READMEs/README.pt-PT.md +++ b/READMEs/README.pt-PT.md @@ -69,7 +69,7 @@ 54 ferramentas MCP 12 hooks automáticos 0 bases de dados externas - 4,800+ testes aprovados + 4,900+ testes aprovados

@@ -1245,7 +1245,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.ro-RO.md b/READMEs/README.ro-RO.md index 1b9e97df25..d6173acd64 100644 --- a/READMEs/README.ro-RO.md +++ b/READMEs/README.ro-RO.md @@ -69,7 +69,7 @@ 54 de instrumente MCP 12 hook-uri automate 0 baze de date externe - 4,800+ teste trecute + 4,900+ teste trecute

@@ -1237,7 +1237,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.ru-RU.md b/READMEs/README.ru-RU.md index 122669c3da..be1e91e4e4 100644 --- a/READMEs/README.ru-RU.md +++ b/READMEs/README.ru-RU.md @@ -69,7 +69,7 @@ 54 MCP tools 12 auto hooks 0 external DBs - 4,800+ tests passing + 4,900+ tests passing

@@ -1243,7 +1243,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.sv-SE.md b/READMEs/README.sv-SE.md index c0a4b80af6..82f04762eb 100644 --- a/READMEs/README.sv-SE.md +++ b/READMEs/README.sv-SE.md @@ -69,7 +69,7 @@ 54 MCP-verktyg 12 automatiska hooks 0 externa databaser - 4,800+ godkända tester + 4,900+ godkända tester

@@ -1251,7 +1251,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.th-TH.md b/READMEs/README.th-TH.md index c45966a18e..c93db2f895 100644 --- a/READMEs/README.th-TH.md +++ b/READMEs/README.th-TH.md @@ -69,7 +69,7 @@ 54 เครื่องมือ MCP 12 hook อัตโนมัติ ไม่ต้องพึ่ง external DB เลย - ผ่านการทดสอบ 4,800+ รายการ + ผ่านการทดสอบ 4,900+ รายการ

@@ -1244,7 +1244,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.tl-PH.md b/READMEs/README.tl-PH.md index 06c531fd55..6d50865f29 100644 --- a/READMEs/README.tl-PH.md +++ b/READMEs/README.tl-PH.md @@ -69,7 +69,7 @@ 54 MCP tool 12 awtomatikong hook 0 panlabas na DB - 4,800+ pumapasang test + 4,900+ pumapasang test

@@ -1253,7 +1253,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.tr-TR.md b/READMEs/README.tr-TR.md index e4e26929b0..d4ef91d08b 100644 --- a/READMEs/README.tr-TR.md +++ b/READMEs/README.tr-TR.md @@ -69,7 +69,7 @@ 54 MCP tools 12 auto hooks 0 external DBs - 4,800+ tests passing + 4,900+ tests passing

@@ -1243,7 +1243,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.uk-UA.md b/READMEs/README.uk-UA.md index 0945eecee3..b26305144d 100644 --- a/READMEs/README.uk-UA.md +++ b/READMEs/README.uk-UA.md @@ -69,7 +69,7 @@ 54 інструменти MCP 12 автоматичних хуків 0 зовнішніх БД - 4,800+ тестів пройдено + 4,900+ тестів пройдено

@@ -1244,7 +1244,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.ur-PK.md b/READMEs/README.ur-PK.md index 23c7add9c0..31250f113a 100644 --- a/READMEs/README.ur-PK.md +++ b/READMEs/README.ur-PK.md @@ -71,7 +71,7 @@ 54 MCP ٹولز 12 خودکار ہکس 0 خارجی ڈیٹابیسز - 4,800+ ٹیسٹس پاس ہو رہے ہیں + 4,900+ ٹیسٹس پاس ہو رہے ہیں

@@ -1248,7 +1248,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.vi-VN.md b/READMEs/README.vi-VN.md index 6ee0e285b7..fd842721a3 100644 --- a/READMEs/README.vi-VN.md +++ b/READMEs/README.vi-VN.md @@ -69,7 +69,7 @@ 54 MCP tools 12 auto hooks 0 external DBs - 4,800+ tests passing + 4,900+ tests passing

@@ -1253,7 +1253,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.zh-CN.md b/READMEs/README.zh-CN.md index 262c222377..4c56b9e1e0 100644 --- a/READMEs/README.zh-CN.md +++ b/READMEs/README.zh-CN.md @@ -69,7 +69,7 @@ 54 个 MCP 工具 12 个自动 hooks 0 个外部数据库 - 4,800+ 项测试通过 + 4,900+ 项测试通过

@@ -1254,7 +1254,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/READMEs/README.zh-TW.md b/READMEs/README.zh-TW.md index 26d095b60e..16d550226f 100644 --- a/READMEs/README.zh-TW.md +++ b/READMEs/README.zh-TW.md @@ -69,7 +69,7 @@ 54 個 MCP 工具 12 個自動 hooks 0 個外部資料庫 - 4,800+ 測試通過 + 4,900+ 測試通過

@@ -1246,7 +1246,7 @@ curl -X POST http://localhost:3111/agentmemory/graph/compact -H "Authorization: ```bash npm run dev # Hot reload npm run build # Production build -npm test # 4,800+ tests +npm test # 4,900+ tests npm run test:integration # API tests (requires running services) ``` diff --git a/assets/tags/light/stat-tests.svg b/assets/tags/light/stat-tests.svg index 743b0d095d..e6fccac91e 100644 --- a/assets/tags/light/stat-tests.svg +++ b/assets/tags/light/stat-tests.svg @@ -1,5 +1,5 @@ - + - 4800+ + 4900+ TESTS PASSING diff --git a/assets/tags/stat-tests.svg b/assets/tags/stat-tests.svg index 7b4a1c20eb..3b31eea1ea 100644 --- a/assets/tags/stat-tests.svg +++ b/assets/tags/stat-tests.svg @@ -1,5 +1,5 @@ - + - 4800+ + 4900+ TESTS PASSING diff --git a/scripts/docs-sync.state.json b/scripts/docs-sync.state.json index 9433edebd3..7f6afbb042 100644 --- a/scripts/docs-sync.state.json +++ b/scripts/docs-sync.state.json @@ -20,16 +20,16 @@ "12" ], "tests": [ - "4800+" + "4900+" ], "functions": [ "323" ], "sourceFiles": [ - "260" + "262" ], "loc": [ - "61000" + "62000" ], "kvScopes": [ "65" diff --git a/scripts/release-gate/run.mjs b/scripts/release-gate/run.mjs index 424f2ff671..72a189dc5f 100644 --- a/scripts/release-gate/run.mjs +++ b/scripts/release-gate/run.mjs @@ -1182,7 +1182,7 @@ async function main() { await instA.stop(); const sid = `gate-dead-${randomBytes(4).toString("hex")}`; const ms = [marker("onyx"), marker("opal"), marker("quartz")]; - await instA.start({ AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE: ms[2] }); + await instA.start({ AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE__: ms[2] }); for (const m of ms) await instA.hook("PostToolUse", instA.toolEvent(sid, m)); const dead = await poll("a dead letter for the failed capture", async () => { const c = await instA.capture("?status=dead"); diff --git a/src/cli/compose-project.ts b/src/cli/compose-project.ts index 78f6978c48..21957a44c1 100644 --- a/src/cli/compose-project.ts +++ b/src/cli/compose-project.ts @@ -72,7 +72,7 @@ const AGENTMEMORY_WORKER_ENV_ALLOWLIST = new Set([ "CLAUDE_MEMORY_LINE_BUDGET", "CLAUDE_PROJECT_PATH", "AGENTMEMORY_SUPPRESS_COST_WARNING", "FALLBACK_PROVIDERS", "OPENAI_API_VERSION", "OPENAI_REASONING_EFFORT", "OPENAI_TIMEOUT_MS", "MINIMAX_BASE_URL", "OPENROUTER_EMBEDDING_MODEL", "OPENROUTER_EMBEDDING_DIMENSIONS", - "AGENTMEMORY_LLM_TIMEOUT_MS", "AGENTMEMORY_CAPTURE_MAX_ATTEMPTS", "AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE", + "AGENTMEMORY_LLM_TIMEOUT_MS", "AGENTMEMORY_CAPTURE_MAX_ATTEMPTS", "AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE__", "AGENTMEMORY_CAPTURE_RETRY_INTERVAL_MS", "AGENTMEMORY_CAPTURE_DEDUP_HOURS", "AGENTMEMORY_CAPTURE_INBOX_MAX", "AGENTMEMORY_CAPTURE_DEAD_MAX", "AGENTMEMORY_CAPTURE_EVENTS_MAX", "AGENTMEMORY_CAPTURE_SPOOL", "AGENTMEMORY_CAPTURE_SPOOL_DIR", diff --git a/src/functions/observe.ts b/src/functions/observe.ts index c292c3a70d..45dd08cd2d 100644 --- a/src/functions/observe.ts +++ b/src/functions/observe.ts @@ -163,9 +163,9 @@ export function registerObserveFunction( }; } - const gateFailMarker = process.env["AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE"]; + const gateFailMarker = process.env["AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE__"]; if (gateFailMarker && JSON.stringify(payload.data ?? null).includes(gateFailMarker)) { - return { success: false, error: "release gate: AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE rejected this capture" }; + return { success: false, error: "release gate: AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE__ rejected this capture" }; } const durable = diff --git a/test/auto-compress.test.ts b/test/auto-compress.test.ts index e774ef168d..b898d9cb6e 100644 --- a/test/auto-compress.test.ts +++ b/test/auto-compress.test.ts @@ -103,8 +103,8 @@ describe("mem::observe auto-compress gate", () => { expect(compressCalls).toHaveLength(0); }); - it("AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE rejects only captures that contain the marker", async () => { - process.env["AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE"] = "gate-marker-x"; + it("AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE__ rejects only captures that contain the marker", async () => { + process.env["AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE__"] = "gate-marker-x"; try { const { registerObserveFunction } = await import("../src/functions/observe.js"); const sdk = mockSdk(); @@ -116,7 +116,7 @@ describe("mem::observe auto-compress gate", () => { const kept = (await sdk.trigger("mem::observe", validPayload())) as { observationId?: string }; expect(kept.observationId).toMatch(/^obs_/); } finally { - delete process.env["AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE"]; + delete process.env["AGENTMEMORY_RELEASE_GATE_FAIL_OBSERVE__"]; } });