Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
v0.56.2.0 docs(research): archive T-Mem validation postmortem (#5453)
Garry Tan46c71f228f60
diff --git a/README.md b/README.mdindex c7fae8a5e7..3b6118dfa0 100644--- a/README.md+++ b/README.md@@ -431,7 +431,7 @@ Start with `gbrain doctor`. For database access failures, use `gbrain engine sta- [`docs/integrations/`](docs/integrations/) — connecting external data sources (voice, email, calendar, embedding providers)- [MCP task guide](docs/mcp/README.md) — deployment and per-client setup (Claude Desktop, Code, Cursor, ChatGPT, Perplexity, Cowork)- [MCP administration](docs/mcp/ADMIN.md) — owner dashboard access, client registration, OAuth, permissions, and token recovery-- [`docs/eval/`](docs/eval/) — eval framework, metric glossary, methodology+- [Evals](docs/eval/) and [research](docs/research/) — methods and results- [`docs/ethos/`](docs/ethos/) — philosophy (thin harness, fat skills, markdown as recipes, origin story)- [`AGENTS.md`](AGENTS.md) — entry point for non-Claude agents- [`CLAUDE.md`](CLAUDE.md) — entry point for Claude Code (deep operating context)diff --git a/docs/research/README.md b/docs/research/README.mdnew file mode 100644index 0000000000..9ddf8aa95b--- /dev/null+++ b/docs/research/README.md@@ -0,0 +1,8 @@+# Research records++Completed experiments and decisions, including negative and inconclusive results.+These are historical evidence, not promises about current GBrain behavior.++| Date | Research | Decision |+|---|---|---|+| 2026-09-24 | [T-Mem validation for GBrain](t-mem-2026-09-24/postmortem.md) | Feature [#5374](https://github.com/garrytan/gbrain/pull/5374) is mothballed, not merged. Preserve the research and evaluator separately: no completed custom feature-on score; a released-code pilot found a small descriptive-trigger retrieval signal but no demonstrated answer-quality gain. |diff --git a/docs/research/t-mem-2026-09-24/SHA256SUMS b/docs/research/t-mem-2026-09-24/SHA256SUMSnew file mode 100644index 0000000000..a795ddbaa9--- /dev/null+++ b/docs/research/t-mem-2026-09-24/SHA256SUMS@@ -0,0 +1,7 @@+1081006a8355d6ae7e313bd36bf29d78eb299d57d30ea950312dfb4312e7fbca inputs.json+da1bb4ae7949c1560647872d6341afaa574e471ec8c0ff80d4942f62c91b4c75 method-audit.md+48d41f73139488aac69e9c80b075b86675310e89fbc8e81905d7bbf5bb507eb2 paired-results.csv+491e924012a23f08b95f20aa9ba22b0b311e3a10aef65e29612a0009834e98a0 postmortem.md+ae9fa70d518155b2f070ba213ab90f6a5ee9df81b478a95b11afb16538ff2823 protocol.md+40cf5e51b9a97b50e0f12069f56240784cdcec1977cc6085f96170a0067ef0d3 results.md+f8b86f2938814e37521ad81b0a2a811485073fa7535d7abeb4267b3d19dda0e5 tmem-reproduction-results.tar.gzdiff --git a/docs/research/t-mem-2026-09-24/inputs.json b/docs/research/t-mem-2026-09-24/inputs.jsonnew file mode 100644index 0000000000..56764ec23a--- /dev/null+++ b/docs/research/t-mem-2026-09-24/inputs.json@@ -0,0 +1,13 @@+{+ "upstream_commit": "dd9e1527bc75908485809580c9520af5a9a42879",+ "datasets": {+ "locomo10.json": {+ "url": "https://raw.githubusercontent.com/snap-research/LoCoMo/3eb6f2c585f5e1699204e3c3bdf7adc5c28cb376/data/locomo10.json",+ "sha256": "79fa87e90f04081343b8c8debecb80a9a6842b76a7aa537dc9fdf651ea698ff4"+ },+ "locomo_plus.json": {+ "url": "https://raw.githubusercontent.com/xjtuleeyf/Locomo-Plus/059f4e3d38f7f1f96765e8e2cb7de3097551bffb/data/locomo_plus.json",+ "sha256": "af2fc6e5e0e88735e28d8dd1ef474b718861a73beb21779809e3b9e1a4fe3d23"+ }+ }+}\ No newline at end of filediff --git a/docs/research/t-mem-2026-09-24/method-audit.md b/docs/research/t-mem-2026-09-24/method-audit.mdnew file mode 100644index 0000000000..68679a571b--- /dev/null+++ b/docs/research/t-mem-2026-09-24/method-audit.md@@ -0,0 +1,157 @@+# T-Mem Table 4 methods audit++**Audit date: 2026-09-24.** The released code supports a matched Scene/Horizon+scene-only ablation, but its documented LoCoMo-Plus command does not implement the+paper's claimed shared hierarchical cascade. Running that command, even after+changing RRF to 60, is a released-code reproduction, not a faithful Table 4+replication. The audit preceded benchmark inference; the subsequent result is in+the [postmortem](postmortem.md).++This is a repository-portable account of the audit. The original line-by-line+working record is preserved inside the [frozen bundle](tmem-reproduction-results.tar.gz).+Paper claims refer to [arXiv 2606.15405v2](https://arxiv.org/abs/2606.15405v2),+especially Table 4, Experimental Setup and the reproducibility appendix. Code+references are pinned to [dd9e1527bc75908485809580c9520af5a9a42879](https://github.com/Sherlockwz/T-Mem/tree/dd9e1527bc75908485809580c9520af5a9a42879),+not mutable upstream `main`.++## Target and data identity++Table 4 reports Cognitive memory-awareness accuracy of **74.81%** for full T-Mem,+**62.34%** without Horizon, and **52.62%** without Scene and Horizon. These are+author reports, not our measurements. The paper reports only the Cognitive+subset as its LoCoMo-Plus score; this is not ordinary exact-answer accuracy.++The pinned public files contain 401 Cognitive samples: 101 causal and 100 each+state, goal and value. Each sample has its own memory library and uses base+conversation `original_index % 10`. It is not ten shared libraries containing all+401 cues. [Stage 0](https://github.com/Sherlockwz/T-Mem/blob/dd9e1527bc75908485809580c9520af5a9a42879/T_mem/main/stage0_locomo_plus_stitch.py#L159-L203)+binds those identities; [Plus stage 5](https://github.com/Sherlockwz/T-Mem/blob/dd9e1527bc75908485809580c9520af5a9a42879/T_mem/main/stage5_retrieval_locomo_plus.py#L88-L151)+selects each sample's library.++The [input manifest](inputs.json) records immutable download URLs and hashes:++| Input | Repository revision | SHA-256 |+|---|---|---|+| `locomo10.json` | `snap-research/LoCoMo` at `3eb6f2c585f5e1699204e3c3bdf7adc5c28cb376` | `79fa87e90f04081343b8c8debecb80a9a6842b76a7aa537dc9fdf651ea698ff4` |+| `locomo_plus.json` | `xjtuleeyf/Locomo-Plus` at `059f4e3d38f7f1f96765e8e2cb7de3097551bffb` | `af2fc6e5e0e88735e28d8dd1ef474b718861a73beb21779809e3b9e1a4fe3d23` |++These are not proof of the exact historical files used for Table 4. The released+downloader follows mutable branches and keeps existing files. Generation metadata+such as `scores`, `ranks` and `final_similarity_score` is not a scoring target and+was not used to select the pilot.++## Paper settings versus the executable route++| Setting | Paper v2 | Released Plus route |+|---|---|---|+| Construction / reader / judge | GPT-4.1-mini / GPT-4o / Gemini-2.5-Flash | Matching aliases; exact serving revisions remain unknown |+| Dense model / reranker | BGE-M3 / BGE-reranker-v2-m3 | Both configured, but Plus never calls the reranker |+| Final topic / scene / item budgets | 15 / 5 / 15 | Reader defaults to ten scene summaries, without topic/item inputs |+| Item-trigger union / cosine gate | 10 / 0.85 | Implemented in stage 6, which Plus skips |+| RRF smoothing | 60 throughout | Stage 5 defaults to 30 |+| Retrieval cascade | Shared across benchmarks | Plus runs stage 5 directly into stage 8 |++The [Plus shell runner](https://github.com/Sherlockwz/T-Mem/blob/dd9e1527bc75908485809580c9520af5a9a42879/scripts/eval_locomo_plus.sh#L152-L203)+shows the direct route. The [configuration](https://github.com/Sherlockwz/T-Mem/blob/dd9e1527bc75908485809580c9520af5a9a42879/T_mem/config.py#L18-L112)+contains the named models and hierarchical budgets, but building those artifacts+does not make the [Plus reader](https://github.com/Sherlockwz/T-Mem/blob/dd9e1527bc75908485809580c9520af5a9a42879/T_mem/main/stage8_qa_locomo_plus.py#L65-L80)+consume them. Setting top-K to five would not supply the missing fifteen items.++Simply inserting stage 6 also does not work: stage 0 writes empty `qa` arrays,+stage 6 iterates those arrays, and its association loader expects a `per_qa` shape+rather than Plus stage 5's `samples` mapping. A paper-settings attempt needs an+explicit adapter and reader-context integration, or the authors' actual runner.+All four historical revisions that changed the Plus shell runner also used the+direct stage-5-to-stage-8 route. No alternative was recovered from those revisions.++## Reader and judge protocol++The released reader uses GPT-4o at temperature zero. Its+[literal template](https://github.com/Sherlockwz/T-Mem/blob/dd9e1527bc75908485809580c9520af5a9a42879/T_mem/main/stage8_qa_locomo_plus.py#L35-L80)+continues the conversation using a `Recalled Experience` block made from selected+scene summaries. It receives no direct gold cue. It strips a leading `A:` or `B:`+from the question, whereas query embedding retains that prefix. Both forms were+preserved in every arm.++The judge uses Gemini-2.5-Flash at temperature zero, once per prediction. Its+[prompt](https://github.com/Sherlockwz/T-Mem/blob/dd9e1527bc75908485809580c9520af5a9a42879/benchmark_eval/locomo_plus/judge/judge_prompts.py#L7-L25)+asks whether the response recalls the cue; the+[evidence loader](https://github.com/Sherlockwz/T-Mem/blob/dd9e1527bc75908485809580c9520af5a9a42879/benchmark_eval/locomo_plus/judge/evidence_loader.py#L37-L64)+uses the original sample's `cue_dialogue` with speaker names remapped. There is no+Cognitive reference-answer field. The shared grader prepends an expert-grader+instruction. Accuracy is correct labels divided by all details; empty predictions+and unparseable judgments count as wrong. Multiple runs use strict-majority voting,+not independently regenerated answers. The paper's explicit three-run setting is+for LoCoMo, not the Plus main score.++The released judge is not verbatim identical to the pinned benchmark's+[official Cognitive prompt](https://github.com/xjtuleeyf/Locomo-Plus/blob/059f4e3d38f7f1f96765e8e2cb7de3097551bffb/evaluation_framework/task_eval/prompt.py#L118-L134),+which allows explicit or implicit use of evidence and omits the Question block.+The benchmark reader defaults to temperature 0.3, while T-Mem uses zero. We did+not silently substitute either benchmark setting for the released T-Mem protocol.++The shared T-Mem client transmits no max-token setting despite a stored config+value. Our transport mapping and explicit native output maxima are disclosed in+the [frozen protocol](protocol.md). Temperature zero is not a guarantee of+bitwise-deterministic provider output.++## Query access, not proven answer-label leakage++[Stage 0 appends the test query](https://github.com/Sherlockwz/T-Mem/blob/dd9e1527bc75908485809580c9520af5a9a42879/T_mem/main/stage0_locomo_plus_stitch.py#L97-L125)+as a session before memory construction.+[Stage 1](https://github.com/Sherlockwz/T-Mem/blob/dd9e1527bc75908485809580c9520af5a9a42879/T_mem/main/stage1_memory_extraction.py#L48-L198)+loads and processes every session without excluding that query.+[Stage 4](https://github.com/Sherlockwz/T-Mem/blob/dd9e1527bc75908485809580c9520af5a9a42879/T_mem/main/stage4_associative_extract.py)+generates triggers from those scenes, and stage 5 embeds their raw dialogue.+The query can therefore affect boundaries, summaries, triggers and retrieval.++The cue itself belongs in the history: it is the intended recall target, not illicit+gold injection. No direct answer-label-to-generator path was found. But this+query-conditioned construction cannot establish performance of a memory store+frozen before a future query. Removing the query would be a separate prospective+experiment, not a hidden correction to this reproduction.++Other released behaviors were kept: lexicographic session sorting, zero-day fallback+for unrecognized time-gap phrases, UUID scene IDs, and scene-ID tie breaking. One+construction is shared across arms to avoid introducing fresh generation/tie noise.++## Correct ablation and pilot hazards++[Stage 5 scoring and fusion](https://github.com/Sherlockwz/T-Mem/blob/dd9e1527bc75908485809580c9520af5a9a42879/T_mem/main/stage5_retrieval_locomo.py#L172-L217)+has three rank lists: raw dialogue (`b`), Scene, and Horizon. The matched arms sum+`b + Scene + Horizon`, `b + Scene`, and `b` respectively, using one candidate+universe, top-K, RRF constant and tie rule. Disabled rank lists contribute nothing.+Setting similarities to zero would still give scene-ID-ordered positive RRF votes+and would test the wrong intervention. Enabled channels preserve that released+zero-score behavior when a scene has no usable trigger vectors.++The sparse-ID wrapper also addresses orchestration hazards without changing prompts+or retrieval scoring:++- Stage 5 processes a prefix, so selected original IDs cannot be compacted and+ reassigned to new `index % 10` histories.+- Stage 8 otherwise emits missing-row errors for every absent library in the full+ dataset; a limited build alone is not a limited scoring experiment.+- The judge's default evidence loader ignores the shell's dataset override, so+ the wrapper explicitly supplies the full pinned 401-row evidence list.+- QA/judge resume caches do not adequately bind changed inputs. The wrapper uses+ hashed inputs and separate arm outputs rather than sharing those weak caches.++The frozen pilot uses five cases per relation, ordered by SHA-256 of+`tmem-table4-pilot-v1:{original_index}` within each relation. Its exact twenty IDs+are in the protocol and [paired results](paired-results.csv). The first twenty+dataset rows are all causal and would not have been a balanced pilot.++## Limits of the available artifacts++No full frozen 401-sample memory/prediction/judgment package was found in the+inspected source tree, README, project documentation or releases at audit time.+The published demo contains six illustrative scenes/QA examples, not benchmark+outputs. This does not prove unpublished artifacts do not exist.++Some main-table baseline scores were borrowed from prior publications. The target+was the authors' within-system Table 4 ablation, not a claim that borrowed baseline+numbers came from new matched runs. Even a positive pilot would establish only a+result on these twenty selected samples under this released route. It would not+replicate the headline effect size, prove the shared cascade ran, or establish+pre-query memory efficacy.diff --git a/docs/research/t-mem-2026-09-24/paired-results.csv b/docs/research/t-mem-2026-09-24/paired-results.csvnew file mode 100644index 0000000000..5186138ce1--- /dev/null+++ b/docs/research/t-mem-2026-09-24/paired-results.csv@@ -0,0 +1,21 @@+sample_id,relation_type,base_conv_idx,full_judged_correct,full_cue_recalled,full_query_rank,no_horizon_judged_correct,no_horizon_cue_recalled,no_horizon_query_rank,no_scene_horizon_judged_correct,no_scene_horizon_cue_recalled,no_scene_horizon_query_rank+sample_009,causal,9,0,0,1,0,0,1,0,0,1+sample_027,causal,7,1,1,1,1,1,1,1,1,1+sample_047,causal,7,1,1,1,1,1,1,1,1,1+sample_054,causal,4,0,0,1,0,0,1,0,0,1+sample_058,causal,8,1,1,1,1,1,1,1,1,1+sample_116,state,6,0,1,,0,1,,0,0,1+sample_128,state,8,0,1,1,1,1,1,1,1,1+sample_148,state,8,1,1,1,1,1,1,1,1,1+sample_160,state,0,1,1,1,1,1,1,1,1,1+sample_166,state,6,0,0,1,0,0,1,0,1,1+sample_214,goal,4,1,0,1,0,0,1,1,0,1+sample_215,goal,5,1,1,1,1,1,1,1,1,1+sample_244,goal,4,1,1,1,1,1,1,1,1,1+sample_265,goal,5,1,1,1,0,1,1,1,1,1+sample_294,goal,4,0,1,1,0,1,1,0,1,1+sample_301,value,1,0,1,1,1,1,1,0,0,1+sample_302,value,2,0,1,1,1,1,1,0,1,1+sample_349,value,9,0,0,1,0,0,1,0,0,1+sample_367,value,7,0,1,1,0,1,1,0,1,1+sample_398,value,8,0,0,,0,0,10,0,0,1diff --git a/docs/research/t-mem-2026-09-24/postmortem.md b/docs/research/t-mem-2026-09-24/postmortem.mdnew file mode 100644index 0000000000..76d0af2f0a--- /dev/null+++ b/docs/research/t-mem-2026-09-24/postmortem.md@@ -0,0 +1,87 @@+---+title: "T-Mem: failed validation for GBrain"+date: 2026-09-24+status: mothballed+tags: [research, retrieval, t-mem, negative-result, postmortem]+---++# T-Mem: failed validation for GBrain++[Research index](../README.md)++**Decision: mothball the custom integration in [gbrain#5374](https://github.com/garrytan/gbrain/pull/5374), and preserve the research without shipping that feature.** This does not establish that the paper's idea is false. Our implementation failed to complete its comparison, and the later released-code pilot did not demonstrate an answer-quality gain.++## In plain English++The idea was to give old memories extra search labels so they would surface when a new question did not use the same words. The labels occasionally helped find the right memory. But they sometimes displaced a useful memory, and the answer writer could still ignore the right fact after receiving it. Better labels did not reliably become better answers.++## Two separate failures++### 1. Our custom implementation never proved its value++The feature-off control found one of two required memories in the retained test case. Feature-on construction repeatedly stopped before query scoring because generated cues failed output-shape or validation requirements. The last retained attempt stopped after 141 processed windows when a literal privacy keyword rule rejected general AI/psychology discussion, rather than a new personal diagnosis.++No complete real feature-on retrieval score was obtained. Passing code tests and isolated cue-generation checks did not establish a retrieval improvement. These were failures of our implementation and evaluation execution, not evidence against the underlying paper.++We spent too much effort iterating on construction and validation before establishing an end-to-end benefit. The sequence should have been a small, faithful matched experiment first, then integration justified by its result.++### 2. The authors' released code ran, but did not reproduce the claimed benefit++Twenty Cognitive cases were selected before inference, balanced across the four relation types. Each case used one shared memory library across three variants. All twenty cases completed in every variant; no failed or unfavorable cases were dropped.++| Variant | Target source scene in top ten | Answers judged correct |+|---|---:|---:|+| Full Scene + Horizon | 14/20 | 9/20 |+| Scene only, no Horizon | 14/20 | 10/20 |+| Raw-dialogue baseline, neither trigger | 13/20 | 10/20 |++Full retrieval recovered two memories missed by the baseline (`sample_116`, `sample_301`), lost one the baseline found (`sample_166`), and tied on seventeen. The recovered summaries contained the relevant facts, but neither recovery produced a successful full-arm answer. Both recoveries also happened with Scene alone: Horizon added no target-memory hits in this sample.++The original one-pass answer labels are preserved. Full versus baseline had zero scored wins, one loss and nineteen ties. However, the judge made visible speaker-attribution mistakes, including the sole scored loss. Do not turn the 45% versus 50% score into a clean claim of harm, or silently correct the scores to favor either variant.++## Why the result was not a faithful headline replication++The paper reports 74.81% versus 52.62% on all 401 Cognitive cases. Its released Plus route differs materially:++- It skips the described hierarchical items/persona/reranker cascade and uses ten scene summaries.+- Its RRF rank-fusion constant defaults to 30 rather than the paper's 60.+- It builds memory with the test query already present. The query-containing scene ranked first in 18/20 full-arm cases and all twenty baseline cases. This is query-conditioned construction, not proof of answer-label leakage, and not a test of a memory store frozen before the query.+- The small pilot shares nine base-conversation histories, and the exact original serving revisions are unknown.++These differences were recorded before inference, not invented to explain the outcome. We did not change the prompts, models, case selection or retrieval settings after observing a disappointing result.++## What we learned++1. Validate a research claim before investing in a production adaptation. A completed matched comparison is more useful than another green implementation milestone.+2. Separate construction reliability, target-memory retrieval and final-answer quality. Improving one does not prove improvement in the next.+3. Inspect actual contexts and judge reasoning. A stored query can dominate retrieval, and an automated judge can reject an answer that recalls the right fact.+4. Match the claimed experiment, not merely the paper's model names. Released scripts, historical artifacts and paper settings must agree, or the experiment needs a narrower label.+5. Preserve weak positive signals as well as failures. Two descriptive-trigger recoveries are real, but they are not evidence of Horizon's added recall or a large overall gain.++## Disposition of #5374 and the companion work++[gbrain#5374](https://github.com/garrytan/gbrain/pull/5374) is **mothballed, closed without merging**. Its branch is retained as historical source, not maintained as a merge-ready feature. The published prototype head is [4f5382a](https://github.com/garrytan/gbrain/commit/4f5382a65f8aef96ab6c04ea7e6c32062da849ad). Its passing implementation tests never supplied the missing end-to-end retrieval result, so neither those tests nor the small released-code signal justify landing it.++The disposition separates three changes:++- [gbrain#5453](https://github.com/garrytan/gbrain/pull/5453) preserves this postmortem, the protocol, measured results and reproducible evidence. It does not introduce the feature's runtime code.+- [gbrain-evals#34](https://github.com/garrytan/gbrain-evals/pull/34) preserves the evaluation harness independently. Its pinned [939232f prototype](https://github.com/garrytan/gbrain/commit/939232f1746381b4e932d620d6c709e29198f14c) belongs to the unmerged experimental lineage, not the current production release. Landing that harness does not establish a capability gain or authorize another paid experiment.+- #5374 remains unmerged. Its conflicts are not being repaired to prepare it for shipping, and the later unpublished prototype work is not being folded into either archival PR.++## Conditions for reopening++Reopening needs new evidence or a materially clearer experimental protocol, not another schema/repair iteration: obtain the exact paper runner or explicitly label a reconstruction; test memory constructed before the query if that is the intended GBrain behavior; complete a preselected matched comparison that measures both retrieval and answers; and audit judge reliability without replacing unfavorable primary results after the fact.++Reopening #5374 also requires an explicit new decision to resume the feature. Preserving its branch, documentation and evaluator is not that decision.++## Evidence and sources++- [Measured results and limitations](results.md).+- [Per-case labels and source-provenance results](paired-results.csv).+- [Pre-inference protocol](protocol.md) and [paper/code methods audit](method-audit.md).+- [Frozen reproduction bundle](tmem-reproduction-results.tar.gz): runner, tests, gateway, data pins, dependency inventory, aggregate receipts and hashes. It excludes credentials and raw benchmark conversations or predictions.+- [Pinned input manifest](inputs.json): public dataset URLs and SHA-256 hashes, without dataset contents.+- [Original paper, arXiv 2606.15405v2](https://arxiv.org/abs/2606.15405v2), audited 2026-09-24.+- [Released source at dd9e152](https://github.com/Sherlockwz/T-Mem/tree/dd9e1527bc75908485809580c9520af5a9a42879).++The original-code work cost $9.224531784 in reported charges, with $0.1653932 retained for three unresolved requests. Historical custom-implementation costs are separate. No paid rerun was started to create this archive. [SHA256SUMS](SHA256SUMS) covers the files in this directory; verify from this directory with `sha256sum -c SHA256SUMS`. The compressed bundle is frozen evidence, not an installed GBrain component or maintained provider gateway. Its own manifest covers its extracted contents.diff --git a/docs/research/t-mem-2026-09-24/protocol.md b/docs/research/t-mem-2026-09-24/protocol.mdnew file mode 100644index 0000000000..fe0c078697--- /dev/null+++ b/docs/research/t-mem-2026-09-24/protocol.md@@ -0,0 +1,35 @@+# Released T-Mem diagnostic, frozen before inference++**Historical protocol:** the experiment is complete; see the [postmortem](postmortem.md) and [results](results.md). The original protocol is preserved below, including its future-tense execution rules. This is not authorization for another run. The unmodified copy inside the [reproduction bundle](tmem-reproduction-results.tar.gz) has SHA-256 `3aa924914c55b9a40d85bdbdd8081f80dfdb086013323118cb9b750a8f932938`.++This is a reproduction of released code at `dd9e1527bc75908485809580c9520af5a9a42879`, not a faithful replication of paper Table 4. The documented Plus route omits the paper's hierarchical items/persona/reranker and constructs memory with access to the query. The independent methods audit records exact source references and further limitations. No inference or outcome was available when this protocol was selected.++## Locked comparison++- Twenty original Cognitive sample indices: `9,27,47,54,58,116,128,148,160,166,214,215,244,265,294,301,302,349,367,398`. Five per relation, selected by ascending SHA-256 of `tmem-table4-pilot-v1:{original_index}` within each relation. Do not change selection based on results.+- Base conversation remains original index modulo ten. Preserve original sample IDs and supply the pinned full 401-row evidence list to the judge.+- Pin `locomo10.json` to SHA-256 `79fa87e90f04081343b8c8debecb80a9a6842b76a7aa537dc9fdf651ea698ff4` and `locomo_plus.json` to `af2fc6e5e0e88735e28d8dd1ef474b718861a73beb21779809e3b9e1a4fe3d23`.+- Construct each query-conditioned library once with original stage 0/1 and stage 4 functions and prompts. Preserve lexicographic session ordering and upstream scene UUIDs. Share scenes, triggers, query embeddings and per-channel scores across arms. Do not construct unused graph/persona artifacts for this scene-only route.+- Full arm: raw-dialogue + Scene + Horizon RRF rank lists. No-Horizon arm: raw-dialogue + Scene. No-Scene/Horizon arm: raw-dialogue only. RRF k=30, identical candidate universe, scene-ID tie break and top ten scene summaries. Disabled rank lists contribute nothing.+- Use GPT-4.1-mini construction, BGE-M3 embeddings, GPT-4o reading, Gemini-2.5-Flash judging. Preserve the released reader and judge prompts, temperature zero, and one judgment per prediction. Transport aliases and exact served providers/model responses must be recorded. No model substitutions.+- Each arm gets isolated prediction and judge outputs. Interleave arms deterministically and hide arm names from judge inputs. Do not reuse weak upstream resume caches between arms.++## Execution and claims++Run the lowest original selected ID first as a plumbing check, without treating its outcome as a reason to retain or drop it. After verifying complete artifacts and actual request routing, continue the other nineteen under the same protocol. Infrastructure repair must not alter retrieval or prompt semantics; any substantive protocol change gets a new labeled run.++Primary outcome: released judge's memory-awareness accuracy over all twenty selected units per arm, with paired full-minus-no-Horizon and full-minus-no-Scene/Horizon wins, losses, ties and absolute differences. Report per-relation results and all failures. Do not present this balanced small sample as the full 401-row score. Missing or incomplete construction cannot be scored as a successful retrieval run or silently omitted.++Secondary diagnostics: actual selected scene IDs, per-channel rankings, cue provenance and reader context. These explain gains or losses but do not replace the primary outcome. Query-free construction and a reconstructed paper-settings cascade are separate follow-ups, not hidden corrections to this run.++Root alone authorizes and executes paid requests. All endpoints pass through a loopback-only, append-only metered gateway with pre-dispatch reservations, bounded native output lengths, a finite deadline, request/response journals and no automatic provider fallback. Unknown charges retain their reservation. Preserve the previous custom-run ledger and failures unchanged. A new allocation is recorded before any provider smoke or experiment dispatch.++## Verified transport and execution details++The four model endpoints passed a four-request compatibility check before any benchmark inference. BGE-M3 returned 1024-dimensional embeddings from DeepInfra; construction and reader requests were served by OpenAI; the judge was served by Google AI Studio. The check cost $0.000071326 in reported router plus external BYOK charges. It is not an evaluation result.++Routes are pinned without fallback: `openai/gpt-4.1-mini` via `openai`, `openai/gpt-4o` via `openai`, `google/gemini-2.5-flash` via `google-ai-studio`, and `baai/bge-m3` via `deepinfra/fp32`. The gateway maps released aliases without modifying prompts. It explicitly transmits each chat endpoint's published native output maximum (32768, 16384, 65535 respectively); the released client otherwise transmits no maximum. Responses ending at the length limit must be disclosed. Endpoint catalogs and actual response model/provider fields are retained; original paper serving revisions are unknown.++The gateway holds an exclusive process lock before replaying its ledger, preserves unknown reservations across restarts, and counts OpenRouter fees plus upstream inference charges when `is_byok=true`. It does not count upstream costs twice on ordinary non-BYOK routes. Worker processes receive only dummy loopback API credentials, with real provider keys removed from their environment. Construction may run libraries concurrently using the released global concurrency setting, but each history remains sequential.++Root inspected all four historical revisions that changed the released Plus shell runner after fetching full Git history. All use stage 5 directly into stage 8; no alternative hierarchical Plus runner was recovered from those script revisions. The public repository has one branch, no tags and no issues at inspection time. These checks narrow the reproducibility gap but do not prove unpublished author artifacts do not exist.diff --git a/docs/research/t-mem-2026-09-24/results.md b/docs/research/t-mem-2026-09-24/results.mdnew file mode 100644index 0000000000..79ce02f9e0--- /dev/null+++ b/docs/research/t-mem-2026-09-24/results.md@@ -0,0 +1,44 @@+# T-Mem released-code reproduction: 20-case result++[Postmortem and decision](postmortem.md) · [Per-case results](paired-results.csv)++We found two genuine retrieval recoveries, offset by one retrieval loss, but did **not** reproduce the paper's answer-quality improvement. The recoveries already occur without Horizon triggers. This is evidence about a small reproduction of the released scene-only pipeline, not a completed replication of Table 4 or a result for the custom GBrain implementation.++## Matched results++| Variant | Target memory retrieved in top ten | Answers marked correct by released judge |+|---|---:|---:|+| Full Scene + Horizon | 14/20 (70%) | 9/20 (45%) |+| No Horizon, retaining Scene | 14/20 (70%) | 10/20 (50%) |+| No Scene or Horizon, retaining raw-dialogue retrieval | 13/20 (65%) | 10/20 (50%) |++Against raw-dialogue-only retrieval, full T-Mem recovered the source memory in `sample_116` and `sample_301`, lost it in `sample_166`, and tied on the other 17 cases. The recovered summaries actually contain the relevant facts, but the reader did not use them successfully. One recovery concerns motivation following a promotion; the other concerns a stated preference for confronting unfair treatment. Both were also recovered by the Scene-only arm. Horizon added no additional target-memory hits in this sample.++The primary answer metric has zero full-versus-baseline wins, one loss and 19 ties. Full versus no-Horizon has two wins, three losses and 15 ties. These are the original one-pass judge labels, preserved without regrading or hand correction.++**The judge is visibly noisy.** In `sample_128`, it incorrectly rejects a full-arm answer that recalls the right participant's neck-pain constraint; that is the sole scored full-versus-baseline loss. In `sample_166`, it incorrectly rejects the baseline's answer recalling the right participant's knee pain. These mistakes prevent treating the five-point score gap as clean evidence of a regression. They do not establish an improvement either.++The retrieval diagnostic uses the original injected cue turns' `dia_id` provenance in the selected scenes, not a second LLM judge or keyword similarity. Both cue turns are covered in all counted hits. It measures source-scene retrieval, not whether every summary or final answer preserves all details.++## What was reproduced++- Released T-Mem commit `dd9e1527bc75908485809580c9520af5a9a42879`, using its original construction, retrieval scoring, reader and judge callables. Thin orchestration preserves sparse original IDs and explicitly removes disabled RRF rank lists.+- Twenty cases selected before inference: five each of causal, state, goal and value. Original IDs: `9,27,47,54,58,116,128,148,160,166,214,215,244,265,294,301,302,349,367,398`. All 20 completed in all three arms; no cases were dropped.+- One shared constructed library and scored embedding pass per case. GPT-4.1-mini construction, BGE-M3 embeddings, GPT-4o reader and Gemini-2.5-Flash judge; temperature zero; released prompts; one judgment per answer; RRF 30 and top-ten scene summaries.+- 1,508 scenes, with 1,041 successful trigger packs and 467 skips required by the released turn-count rule. No pending summaries, trigger parse failures or empty/error predictions; no observed response ended at the length limit. This does not make the judge's substantive judgments reliable.++## Why this is not the paper's headline replication++The paper reports 74.81% full versus 52.62% without Scene/Horizon on all 401 Cognitive cases. Its released Plus runner instead skips the described hierarchical items/persona/reranker cascade, defaults to RRF 30 rather than 60, and constructs memory with access to the test query. The query-containing scene ranked first in 18/20 full-arm cases and all 20 raw-dialogue-only cases. No hidden correction to those behaviors was made here.++The small balanced sample spans only nine base-conversation indices; the paired cases are not twenty independent histories. It cannot establish equivalence, broad harm, or the paper's full-dataset effect size. Remote model serving revisions are not proven identical to those used by the authors. See `method-audit.md` and `protocol.md` for the source-level discrepancies and frozen protocol.++## Cost and artifacts++Reported cost for model compatibility checks, the initial one-case check and the full pilot was **$9.224531784**, including external BYOK charges. Three unresolved requests retain **$0.1653932** in reservations; they are not treated as free. Both experiment gateways are stopped. Historical custom GBrain costs remain separate.++The final pilot scope is `4b8e85146d3b6ff27422b208`; its receipt SHA-256 is `093a9e91fc3c5c92aac8e02caa8dac48b92d878325d2ad9fc9ba37a6d910519c`. The [reproduction bundle](tmem-reproduction-results.tar.gz) contains the frozen runner, tests, gateway, data pins, dependency inventory, per-case labels/provenance results and receipt hashes, but no credentials, raw benchmark conversations, rendered benchmark requests or generated personal-name text. Public prompt templates remain in the methods audit. The paired results are also available directly as [CSV](paired-results.csv).++The checked-in CSV uses LF line endings; its cells are identical to the original CSV in the unchanged bundle. The methods audit is a publication copy with portable source links. The protocol retains its original text beneath an archival note; the bundle preserves the unmodified research records.++**Conclusion:** a small descriptive-trigger retrieval signal exists, but this run supplies no demonstrated answer-quality benefit or additional target-memory recall from Horizon. It does not justify resuming or shipping the custom GBrain integration. An exact Table 4 claim still requires resolving the missing paper execution path, not merely running more cases through this released route.diff --git a/docs/research/t-mem-2026-09-24/tmem-reproduction-results.tar.gz b/docs/research/t-mem-2026-09-24/tmem-reproduction-results.tar.gznew file mode 100644index 0000000000..db88c63fe3Binary files /dev/null and b/docs/research/t-mem-2026-09-24/tmem-reproduction-results.tar.gz differdiff --git a/llms-full.txt b/llms-full.txtindex ab4fd84c6d..648e3fa377 100644--- a/llms-full.txt+++ b/llms-full.txt@@ -3597,7 +3597,7 @@ Start with `gbrain doctor`. For database access failures, use `gbrain engine sta- [`docs/integrations/`](docs/integrations/) — connecting external data sources (voice, email, calendar, embedding providers)- [MCP task guide](docs/mcp/README.md) — deployment and per-client setup (Claude Desktop, Code, Cursor, ChatGPT, Perplexity, Cowork)- [MCP administration](docs/mcp/ADMIN.md) — owner dashboard access, client registration, OAuth, permissions, and token recovery-- [`docs/eval/`](docs/eval/) — eval framework, metric glossary, methodology+- [Evals](docs/eval/) and [research](docs/research/) — methods and results- [`docs/ethos/`](docs/ethos/) — philosophy (thin harness, fat skills, markdown as recipes, origin story)- [`AGENTS.md`](AGENTS.md) — entry point for non-Claude agents- [`CLAUDE.md`](CLAUDE.md) — entry point for Claude Code (deep operating context)