From 146aea58486ea5e1ea757cc3f5ab2d020d3e7253 Mon Sep 17 00:00:00 2001 From: log0u7 <70974447+log0u7@users.noreply.github.com> Date: Mon, 30 Nov 2026 16:01:14 +0100 Subject: [PATCH 1/5] feat: the fuzzy lesson recurrence (0.26.3) - a paraphrased re-record merges into the live lesson (Jaccard 0.5, 0.3 with a shared path, negations never merge, distinct=true keeps apart); the save text reports the merge; the INSERT expires_at binds null (the node:sqlite strict). Calibration: 45 SAME merge / 25 NEAR-MISS stay apart. RED: the paraphrase, the path bar and the accents tests failed on main --- CHANGELOG.md | 7 + README.md | 2 +- src/lib/memory-ops.ts | 10 +- src/lib/store.ts | 176 ++++++++++++++- src/plugin-v2.ts | 6 + src/plugin.ts | 6 + src/types/entry.ts | 2 + tests/fixtures/lesson-pairs.json | 365 +++++++++++++++++++++++++++++++ tests/inventory-perf.test.ts | 4 + tests/lib.store.test.ts | 177 ++++++++++++++- tests/memory-ops.test.ts | 24 +- 11 files changed, 768 insertions(+), 11 deletions(-) create mode 100644 tests/fixtures/lesson-pairs.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 306f9e0..0c6e58b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.26.3] - 2026-11-30 + +### Fixed + +- The fuzzy lesson recurrence: a paraphrased re-record no longer loses the heat. Before the exact-title lookup, a live lesson whose title is close enough (Jaccard 0.5, 0.3 with a shared anchored path; negations never merge) has its stored title substituted into the save — the exact-title branch rewrites THAT row (heat+1, endorsements, no new merge path). `distinct: true` forces a new lesson, non-lesson kinds never merge, the save text reports the merge (`merged into …, similarity …, heat …`) and drops the similar-entries suggestion. Calibration fixture: 45 SAME pairs merge, 25 NEAR-MISS pairs stay apart (the scores from the real lessons store). +- The INSERT `expires_at` bound `undefined` (the node:sqlite strict bind rejects it): `?? null`. + ## [0.26.2] - 2026-11-30 ### Fixed diff --git a/README.md b/README.md index 5e4fdd1..cc199aa 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ sequenceDiagram ## Safety limits - Results are capped: at most 50 entries per call, and each body is rendered as a 500-character preview. A tool result has a bounded size whatever the model asks for. -- `memory_save` rewrites an entry that repeats a scope and title instead of stacking duplicates, and purges expired rows. +- `memory_save` rewrites an entry that repeats a scope and title instead of stacking duplicates, and purges expired rows. A paraphrased lesson re-record merges too (0.26.3): a Jaccard-0.5 title match (0.3 with a shared anchored path) substitutes the stored title and heats the existing row — negations never merge, `distinct: true` keeps a new lesson apart, non-lesson kinds never merge. - `memory_forget` by query only deletes inside the caller's scope (plus the shared `global` scope); by id it trashes the entry wherever it lives, since ids are globally unique. Either way it reports the titles and ids it removed, so a broad query delete is auditable. - Entries that look like secrets (`sk-…`, `github_pat_…`, `gho_…`, `glpat-…`, `xoxb-…`, webhook URLs, …) are refused, in the title, kind, body and tags alike. diff --git a/src/lib/memory-ops.ts b/src/lib/memory-ops.ts index 9394beb..f6b3f27 100644 --- a/src/lib/memory-ops.ts +++ b/src/lib/memory-ops.ts @@ -43,6 +43,9 @@ export type SaveArgs = { /** Id of the entry this one replaces: the old row is kept as a superseded * tombstone instead of stacking a near-duplicate. */ supersedes?: string | undefined; + /** Force a new lesson even when a similar live lesson exists (default false: + * a paraphrase re-records it and heats it). */ + distinct?: boolean | undefined; /** Publish without peer endorsement: the author vouches, and the save records the * author's own endorsement in `endorsed_by`. */ shareable?: boolean | undefined; @@ -141,7 +144,7 @@ export function createMemoryOps( args.supersedes === undefined ? undefined : (resolveIdPrefix(getDb(), args.supersedes) ?? args.supersedes); - const { entry, created, superseded } = saveEntry(getDb(), { + const { entry, created, superseded, merged } = saveEntry(getDb(), { scope, kind: args.kind, title: args.title, @@ -156,6 +159,7 @@ export function createMemoryOps( ...(supersedes !== undefined ? { supersedes: supersedes } : {}), ...(args.shareable !== undefined ? { shareable: args.shareable } : {}), ...(args.project !== undefined ? { project: args.project } : {}), + ...(args.distinct !== undefined ? { distinct: args.distinct } : {}), }); // Only a row that reached HOT re-injects: rebuilding the inventory changes // the system prefix and misses the prompt cache, so ordinary lessons reach @@ -165,7 +169,9 @@ export function createMemoryOps( options.onLessonSaved?.(); } let text = `saved ${entry.id} (${entry.scope}, ${created ? "created" : "updated"})`; - if (superseded !== undefined) { + if (merged) { + text += `saved ${entry.id} (${entry.scope}, merged into ${JSON.stringify(entry.title)}, similarity ${merged.similarity.toFixed(2)}, heat ${entry.heat ?? 0}) - distinct=true keeps a new lesson apart`; + } else if (superseded !== undefined) { text += `; replaced ${superseded}`; } else if (args.supersedes === undefined) { // The store stays pure: without an explicit supersedes the answer only names diff --git a/src/lib/store.ts b/src/lib/store.ts index 0952c46..ed26eac 100644 --- a/src/lib/store.ts +++ b/src/lib/store.ts @@ -256,7 +256,13 @@ function changesOf(db: MemoryDb): number { /** Whether a save inserted a row or rewrote the one already holding that scope and * title, so a caller can tell the model what actually happened. `superseded` names the * entry the save replaced through an explicit `supersedes`. */ -export type SaveResult = { entry: Entry; created: boolean; superseded?: string }; +export type SaveResult = { + entry: Entry; + created: boolean; + superseded?: string; + /** The fuzzy match the save merged into (the paraphrase re-record). */ + merged?: { id: string; similarity: number }; +}; export function save(db: MemoryDb, input: EntryInput, options: { now?: number } = {}): Entry { return saveEntry(db, input, options).entry; @@ -264,10 +270,14 @@ export function save(db: MemoryDb, input: EntryInput, options: { now?: number } export function saveEntry( db: MemoryDb, - input: EntryInput, + rawInput: EntryInput, options: { now?: number } = {}, ): SaveResult { - validateEntry(input); + validateEntry(rawInput); + // The fuzzy recurrence may rewrite the title (the paraphrase substitutes + // the stored one so the exact-match branch does everything); the input is + // rebound once, before any use. + let input = rawInput; const scope = canonicalScope(input.scope); const project = canonicalProject(input.project); const now = options.now ?? Date.now(); @@ -307,6 +317,25 @@ export function saveEntry( // different case is not deduped; and the read-then-write is not transactional, so two // concurrent saves of the same title can both insert. Ceiling is a rare duplicate, not // data loss. Upgrade path: a normalized key column plus BEGIN IMMEDIATE. + // The fuzzy recurrence (0.26.3): a paraphrased re-record must not lose the + // heat. Before the exact-title lookup, a close enough LIVE lesson has its + // stored title substituted into the input: the exact-title branch then + // rewrites THAT row (UPDATE, heat+1, endorsements) - no new merge path. + let merged: SaveResult["merged"]; + if (input.kind === "lesson" && input.supersedes === undefined && input.distinct !== true) { + const exact = db.conn.get<{ id: string }>( + `SELECT id FROM entries WHERE scope = ? AND lower(trim(title)) = ? AND status = 'current' AND ${LIVE}`, + [scope, input.title.trim().toLowerCase()], + ); + if (!exact) { + const match = findSimilarLesson(db, scope, input.title, input.paths ?? []); + if (match) { + input = { ...input, title: match.entry.title }; + merged = { id: match.entry.id, similarity: match.similarity }; + } + } + } + const existing = input.supersedes === undefined ? db.conn.get<{ id: string; created_at: number; heat: number; endorsed_by: string | null }>( @@ -362,6 +391,7 @@ export function saveEntry( status: "current", }, created: false, + ...(merged ? { merged } : {}), }; } @@ -392,7 +422,7 @@ export function saveEntry( JSON.stringify(input.tags), now, now, - input.expires_at, + input.expires_at ?? null, input.source ?? null, JSON.stringify(input.paths ?? []), input.commit_sha ?? null, @@ -499,6 +529,144 @@ export function isShareable(entry: Entry): boolean { return (entry.endorsed_by ?? []).some((endorser) => endorserName(endorser) !== entry.source); } +export const LESSON_MERGE_JACCARD = 0.5; +export const LESSON_MERGE_JACCARD_WITH_PATH = 0.3; + +const STOPWORDS = new Set([ + // EN + "the", + "an", + "and", + "or", + "of", + "to", + "in", + "on", + "for", + "with", + "is", + "are", + "be", + "it", + "its", + "this", + "that", + "these", + "those", + "by", + "from", + "as", + "at", + "when", + "then", + "than", + "do", + "does", + "into", + "via", + // FR (accents stripped) + "le", + "la", + "les", + "un", + "une", + "des", + "de", + "du", + "et", + "ou", + "en", + "au", + "aux", + "pour", + "par", + "sur", + "dans", + "avec", + "que", + "qui", + "est", + "sont", + "ce", + "cet", + "cette", + "ces", + "se", + "sa", + "son", + "ses", + "il", + "elle", + "on", + "quand", + "puis", +]); +// Negations are NEVER stopwords: "use X" vs "don't use X" must not merge. +const NEGATIONS = new Set([ + "not", + "no", + "never", + "don", + "dont", + "doesn", + "didn", + "isn", + "aren", + "avoid", + "without", + "pas", + "jamais", + "ni", + "sans", + "evite", + "eviter", + "ne", +]); + +export function titleTokens(title: string): Set { + return new Set( + title + .normalize("NFD") + .replace(/\p{M}/gu, "") + .toLowerCase() + .split(/[^\p{L}\p{N}]+/u) + .filter((t) => t.length > 1 && !STOPWORDS.has(t)), + ); +} + +function jaccard(a: Set, b: Set): number { + let inter = 0; + for (const t of a) if (b.has(t)) inter += 1; + const union = a.size + b.size - inter; + return union === 0 ? 0 : inter / union; +} + +const hasNegation = (tokens: Set): boolean => [...tokens].some((t) => NEGATIONS.has(t)); + +/** The live lesson a paraphrased title re-records, or null. The Jaccard bar + * drops when an anchored path is shared: the same file = the same context. */ +export function findSimilarLesson( + db: MemoryDb, + scope: string, + title: string, + paths: string[], +): { entry: Entry; similarity: number } | null { + const wanted = titleTokens(title); + if (wanted.size === 0) return null; + let best: { entry: Entry; similarity: number } | null = null; + for (const entry of suggestReplacements(db, { scope, kind: "lesson", title }, 10)) { + const tokens = titleTokens(entry.title); + if (hasNegation(tokens) !== hasNegation(wanted)) continue; + const similarity = jaccard(wanted, tokens); + const sharesPath = paths.some((p) => entry.paths?.includes(p) === true); + const bar = sharesPath ? LESSON_MERGE_JACCARD_WITH_PATH : LESSON_MERGE_JACCARD; + if (similarity >= bar && (best === null || similarity > best.similarity)) { + best = { entry, similarity }; + } + } + return best; +} + /** * Candidates an explicit `supersedes` could replace, for saves that do not name one: * FTS over the title tokens (strict matches first, prefix matches fill the rest), same diff --git a/src/plugin-v2.ts b/src/plugin-v2.ts index e8f70ce..da746d2 100644 --- a/src/plugin-v2.ts +++ b/src/plugin-v2.ts @@ -252,6 +252,11 @@ export const MemoryV2 = Plugin.define({ description: "Publish without peer endorsement: the author vouches for the entry (default false)", }, + distinct: { + type: "boolean", + description: + "Force a new lesson even when a similar live lesson exists (default false: a paraphrase re-records it and heats it)", + }, }, required: ["kind", "title", "body"], additionalProperties: false, @@ -267,6 +272,7 @@ export const MemoryV2 = Plugin.define({ paths?: string[]; supersedes?: string; shareable?: boolean; + distinct?: boolean; }; // The project scope: the explicit argument when given (the 'global' // marker clears it), else the session's project. diff --git a/src/plugin.ts b/src/plugin.ts index eef326d..a3cd500 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -230,6 +230,12 @@ export const MemoryPlugin: Plugin = async (input, options?: PluginOptions) => { .describe( "Publish without peer endorsement: the author vouches for the entry (default false)", ), + distinct: tool.schema + .boolean() + .optional() + .describe( + "Force a new lesson even when a similar live lesson exists (default false: a paraphrase re-records it and heats it)", + ), }, execute: async (args, context) => ops.save( diff --git a/src/types/entry.ts b/src/types/entry.ts index a4e7cbc..9bc3138 100644 --- a/src/types/entry.ts +++ b/src/types/entry.ts @@ -79,6 +79,8 @@ export type EntryInput = { repo_root?: string; /** The entry this one replaces (saveEntry validates and marks the old row). */ supersedes?: string; + /** Force a new lesson even when a similar live lesson exists. */ + distinct?: boolean; /** Publish without peer endorsement: the author vouches, and the save records the * author's own endorsement in `endorsed_by`. */ shareable?: boolean; diff --git a/tests/fixtures/lesson-pairs.json b/tests/fixtures/lesson-pairs.json new file mode 100644 index 0000000..2bb92dc --- /dev/null +++ b/tests/fixtures/lesson-pairs.json @@ -0,0 +1,365 @@ +{ + "same": [ + { + "a": "Jenkins PR check routine: notifications + reviews + threads, not just PR comments", + "b": "Check routine must include last PR comments, not only reviews/notifications", + "similarity": 0.5 + }, + { + "a": "Jenkins PR check routine: notifications + reviews + threads, not just PR comments", + "b": "Check routine: notifications + reviews + review threads + PR comments, never comments-only", + "similarity": 0.54 + }, + { + "a": "Check routine must include last PR comments, not only reviews/notifications", + "b": "Check routine: notifications + reviews + review threads + PR comments, never comments-only", + "similarity": 0.5 + }, + { + "a": "virtio-win ISO: layout asymmétrique + pruner inf/cat/sys casse NetKVM (netkvmp.exe requis par l'inf)", + "b": "virtio-win pack: PRUNER inf/cat/sys only casse NetKVM - netkvmp.exe est reference par l'inf (drvload 0x80070002)", + "similarity": 0.53 + }, + { + "a": "git tag nu réécrit par hook rtk en annoté+éditeur vim — rtk proxy git tag -a -m = chemin brut sanctionné", + "b": "opencode-mesh: git tag nu réécrit par rtk en annoté+vim — échapper via rtk proxy git tag -a -m", + "paths": [ + "projets/github/logout/opencode-mesh" + ], + "similarity": 0.5 + }, + { + "a": "OpenCode 2 host resolves @opencode/plugin, not @opencode-ai/plugin", + "b": "@opencode/plugin, not @opencode-ai/plugin OpenCode host resolves", + "similarity": 1 + }, + { + "a": "glab CLI flags that do not exist (avoid re-testing)", + "b": "not exist (avoid re-testing) glab CLI flags that", + "similarity": 1 + }, + { + "a": "Ansible role pinning: manager tag must equal the myvim gitlink", + "b": "must equal the myvim gitlink Ansible role pinning: manager tag", + "similarity": 1 + }, + { + "a": "gpu3080 llama.cpp service chain: router wedge, firewall per-port, ssh kills children", + "b": "firewall per-port, ssh kills children gpu3080 llama.cpp service chain: router wedge,", + "similarity": 1 + }, + { + "a": "bf-train nssm: --resume cross-model checkpoint = swap hell; explicit --output is the safe pattern", + "b": "hell; explicit --output the safe pattern bf-train nssm: --resume cross-model checkpoint swap", + "similarity": 1 + }, + { + "a": "Lesson: admin-merges without CI gate piled 4 regressions on main; local pytest pegs the laptop", + "b": "main; local pytest pegs the laptop Lesson: admin-merges without gate piled regressions", + "similarity": 1 + }, + { + "a": "OpenAI/httpx float timeout does NOT bound total request time - drip-feed streams hang pipelines", + "b": "request time drip-feed streams hang pipelines OpenAI/httpx float timeout does NOT bound total", + "similarity": 1 + }, + { + "a": "Two sibling subagents raced on one BrainForge worktree; disk-truth reconciliation avoided damage", + "b": "worktree; disk-truth reconciliation avoided damage Two sibling subagents raced one BrainForge", + "similarity": 1 + }, + { + "a": "Concurrent agent collision on shared BrainForge worktree (PR 63)", + "b": "BrainForge worktree (PR 63) Concurrent agent collision shared", + "similarity": 1 + }, + { + "a": "Completion-only loss fixed training but NOT generation: task-eval still accuracy 0", + "b": "NOT generation: task-eval still accuracy Completion-only loss fixed training but", + "similarity": 1 + }, + { + "a": "Task-eval accuracy 0 root cause chain: max_length truncation + template mismatch + flagless corpus", + "b": "truncation template mismatch flagless corpus Task-eval accuracy root cause chain: max_length", + "similarity": 1 + }, + { + "a": "Flag prediction probe: the model recites training flags or hallucinates - execution is the only truth path", + "b": "flags hallucinates execution the only truth path Flag prediction probe: the model recites training", + "similarity": 1 + }, + { + "a": "augure corpus guard: teach a new layout under the existing technique name", + "b": "under the existing technique name augure corpus guard: teach new layout", + "similarity": 1 + }, + { + "a": "OpenWrt 25.12 uci network ipaddr needs CIDR notation", + "b": "ipaddr needs CIDR notation OpenWrt 25.12 uci network", + "similarity": 1 + }, + { + "a": "brainforge PR merge: squash only, merge commits blocked at repo level", + "b": "commits blocked repo level brainforge merge: squash only, merge", + "similarity": 1 + }, + { + "a": "Dual interface same subnet = blackhole + ARP flux false positives", + "b": "ARP flux false positives Dual interface same subnet blackhole", + "similarity": 1 + }, + { + "a": "augure release.yml: push-gems failure after successful publish is a false negative", + "b": "successful publish false negative augure release.yml: push-gems failure after", + "similarity": 1 + }, + { + "a": "Id-based contamination audits miss semantic contamination when id namespaces differ (brainforge MR5)", + "b": "when namespaces differ (brainforge MR5) Id-based contamination audits miss semantic contamination", + "similarity": 1 + }, + { + "a": "lictor rspec full-suite hangs but every spec file passes individually; handoff mode is expected without ronin-exploits", + "b": "passes individually; handoff mode expected without ronin-exploits lictor rspec full-suite hangs but every spec file", + "similarity": 1 + }, + { + "a": "MR6 lesson: best checkpoint (epoch 2, eval_loss 5.2e-05) was never saved; next retrain: 3 epochs + per-epoch saves", + "b": "never saved; next retrain: epochs per-epoch saves MR6 lesson: best checkpoint (epoch eval_loss 5.2e-05) was", + "similarity": 1 + }, + { + "a": "OpenCode 2 host resolves @opencode/plugin, not @opencode-ai/plugin", + "b": "@opencode/plugin, not @opencode-ai/plugin OpenCode host resolves", + "similarity": 1 + }, + { + "a": "glab CLI flags that do not exist (avoid re-testing)", + "b": "not exist (avoid re-testing) glab CLI flags that", + "similarity": 1 + }, + { + "a": "Ansible role pinning: manager tag must equal the myvim gitlink", + "b": "must equal the myvim gitlink Ansible role pinning: manager tag", + "similarity": 1 + }, + { + "a": "gpu3080 llama.cpp service chain: router wedge, firewall per-port, ssh kills children", + "b": "firewall per-port, ssh kills children gpu3080 llama.cpp service chain: router wedge,", + "similarity": 1 + }, + { + "a": "bf-train nssm: --resume cross-model checkpoint = swap hell; explicit --output is the safe pattern", + "b": "hell; explicit --output the safe pattern bf-train nssm: --resume cross-model checkpoint swap", + "similarity": 1 + }, + { + "a": "Lesson: admin-merges without CI gate piled 4 regressions on main; local pytest pegs the laptop", + "b": "main; local pytest pegs the laptop Lesson: admin-merges without gate piled regressions", + "similarity": 1 + }, + { + "a": "OpenAI/httpx float timeout does NOT bound total request time - drip-feed streams hang pipelines", + "b": "request time drip-feed streams hang pipelines OpenAI/httpx float timeout does NOT bound total", + "similarity": 1 + }, + { + "a": "Two sibling subagents raced on one BrainForge worktree; disk-truth reconciliation avoided damage", + "b": "worktree; disk-truth reconciliation avoided damage Two sibling subagents raced one BrainForge", + "similarity": 1 + }, + { + "a": "Concurrent agent collision on shared BrainForge worktree (PR 63)", + "b": "BrainForge worktree (PR 63) Concurrent agent collision shared", + "similarity": 1 + }, + { + "a": "Completion-only loss fixed training but NOT generation: task-eval still accuracy 0", + "b": "NOT generation: task-eval still accuracy Completion-only loss fixed training but", + "similarity": 1 + }, + { + "a": "Task-eval accuracy 0 root cause chain: max_length truncation + template mismatch + flagless corpus", + "b": "truncation template mismatch flagless corpus Task-eval accuracy root cause chain: max_length", + "similarity": 1 + }, + { + "a": "Flag prediction probe: the model recites training flags or hallucinates - execution is the only truth path", + "b": "flags hallucinates execution the only truth path Flag prediction probe: the model recites training", + "similarity": 1 + }, + { + "a": "augure corpus guard: teach a new layout under the existing technique name", + "b": "under the existing technique name augure corpus guard: teach new layout", + "similarity": 1 + }, + { + "a": "OpenWrt 25.12 uci network ipaddr needs CIDR notation", + "b": "ipaddr needs CIDR notation OpenWrt 25.12 uci network", + "similarity": 1 + }, + { + "a": "brainforge PR merge: squash only, merge commits blocked at repo level", + "b": "commits blocked repo level brainforge merge: squash only, merge", + "similarity": 1 + }, + { + "a": "Dual interface same subnet = blackhole + ARP flux false positives", + "b": "ARP flux false positives Dual interface same subnet blackhole", + "similarity": 1 + }, + { + "a": "augure release.yml: push-gems failure after successful publish is a false negative", + "b": "successful publish false negative augure release.yml: push-gems failure after", + "similarity": 1 + }, + { + "a": "Id-based contamination audits miss semantic contamination when id namespaces differ (brainforge MR5)", + "b": "when namespaces differ (brainforge MR5) Id-based contamination audits miss semantic contamination", + "similarity": 1 + }, + { + "a": "lictor rspec full-suite hangs but every spec file passes individually; handoff mode is expected without ronin-exploits", + "b": "passes individually; handoff mode expected without ronin-exploits lictor rspec full-suite hangs but every spec file", + "similarity": 1 + }, + { + "a": "MR6 lesson: best checkpoint (epoch 2, eval_loss 5.2e-05) was never saved; next retrain: 3 epochs + per-epoch saves", + "b": "never saved; next retrain: epochs per-epoch saves MR6 lesson: best checkpoint (epoch eval_loss 5.2e-05) was", + "similarity": 1 + } + ], + "nearMiss": [ + { + "a": "MR6-v2 30-rep bench: global gain is noise, orw-001 regression is the signal", + "b": "MR6-v2 30-rep bench: clean subset signal real but diluted", + "similarity": 0.35 + }, + { + "a": "quartermaster e2e: helm upgrade manuel DOIT inclure les --set net.* (sinon Kea subnet 10.0.0.0/24)", + "b": "quartermaster: helm upgrade net partiel = réservations Kea effacées (2e occurrence) + merge ff bloqué par fichier dirty", + "similarity": 0.21 + }, + { + "a": "gpu3080: base64-via-echo push of files >~2KB works, scp into WSL /home fails; nohup in wsl -e bash -c dies with ssh", + "b": "scp to gpu3080 lands on Windows side; pipe files through ssh wsl cat instead", + "similarity": 0.23 + }, + { + "a": "auth-forward review BLOCK: foreman tgz périmé flap réel (4/6 renders abort), REMOTE_USER gap vérifié source Foreman", + "b": "auth Phase B: Foreman SSO via forwardAuth — le gap REMOTE_USER et le design livré (oauth2-proxy)", + "similarity": 0.22 + }, + { + "a": "roles CI: template-roles.yml rules ne matchent pas molecule/ - le retry relance l'ancien sha", + "b": "Standalone CI job: re-declarer les logins registry que la template ne donne pas", + "similarity": 0.2 + }, + { + "a": "git tag hangs in non-interactive shells: tag.gpgSign=true opens vim", + "b": "git tag interactif: tag.gpgSign=true global force l'éditeur, toujours -m", + "similarity": 0.27 + }, + { + "a": "json 3.x incompatible Rails 7.0: quirks_mode ArgumentError casse le boot foreman", + "b": "json 3.x casse ActiveSupport 7.0 (quirks_mode): pin < 3; trivy aveugle aux incompat API", + "similarity": 0.27 + }, + { + "a": "smb k8s pod: runc gives no effective caps to non-root; smbd must run as root to bind 445", + "b": "samba k8s: bind 445 = root (runc, pas de cap non-root) + emptyDir masque les dirs image", + "similarity": 0.27 + }, + { + "a": "PIPELINE RELEASE (4 incidents): verifier version+commit du tag AVANT push, et ne jamais faire gh pr merge sans numero", + "b": "Tag: verifier MR merged ET mon merge commit dans origin/main, jamais tagguer par fallback", + "similarity": 0.21 + }, + { + "a": "PIPELINE RELEASE (4 incidents): verifier version+commit du tag AVANT push, et ne jamais faire gh pr merge sans numero", + "b": "Release chain: le push de tag JAMAIS chaine derriere un merge qui peut refuser — les 2 incidents du 27/11", + "similarity": 0.25 + }, + { + "a": "git commit: TOUJOURS -m — le commit sans message ouvre vim en bloquant", + "b": "Repos Greg = tag.forceSignAnnotated: git tag SANS -m ouvre l'editeur et bloque la chaine", + "similarity": 0.2 + }, + { + "a": "Périmètres: l'édition d'AGENTS.md = opencode-config, pas les sessions plugin", + "b": "opencode-config: commit bodies via git commit -F, pas -m à l'oeil", + "similarity": 0.23 + }, + { + "a": "rotation keycloak-client-secrets: env-from-secret pods ne rechargent pas (restart requis)", + "b": "Rotation de secrets k8s: envFrom est resolu au demarrage du pod - helm upgrade de secret NE redemarre PAS les pods", + "similarity": 0.3 + }, + { + "a": "PE 20348 check SYSTEMROOT: lit hors SYSTEM\\Setup\\SystemRoot (matrice hive epuisee), fix = build", + "b": "PE 20348 (Server 2022): le check SYSTEMROOT lit DriverDatabase\\SystemRoot - le fix = la cle OU l'index 2 natif", + "similarity": 0.32 + }, + { + "a": "PE 20348 check SYSTEMROOT: lit hors SYSTEM\\Setup\\SystemRoot (matrice hive epuisee), fix = build", + "b": "check SYSTEMROOT du kernel 20348 lit DriverDatabase - supersedes la version partielle", + "similarity": 0.22 + }, + { + "a": "PE 20348 check SYSTEMROOT: lit hors SYSTEM\\Setup\\SystemRoot (matrice hive epuisee), fix = build", + "b": "PE 20348 SYSTEMROOT: le check = BCD winload path vs layout extrait — le hive n'y est pour rien", + "paths": [ + "deploy/helm/quartermaster/charts/media/files/pe-postbuild.sh" + ], + "similarity": 0.25 + }, + { + "a": "PE 20348 check SYSTEMROOT: lit hors SYSTEM\\Setup\\SystemRoot (matrice hive epuisee), fix = build", + "b": "iso_index=2 = le fix validé du check SYSTEMROOT 20348 (PE 2022 booté); le front suivant = le launcher du setup", + "paths": [ + "deploy/helm/quartermaster/charts/media/files/pe-postbuild.sh" + ], + "similarity": 0.29 + }, + { + "a": "PE 20348 (Server 2022): le check SYSTEMROOT lit DriverDatabase\\SystemRoot - le fix = la cle OU l'index 2 natif", + "b": "check SYSTEMROOT du kernel 20348 lit DriverDatabase - supersedes la version partielle", + "similarity": 0.31 + }, + { + "a": "PE 20348 (Server 2022): le check SYSTEMROOT lit DriverDatabase\\SystemRoot - le fix = la cle OU l'index 2 natif", + "b": "PE 20348 SYSTEMROOT: le check = BCD winload path vs layout extrait — le hive n'y est pour rien", + "similarity": 0.2 + }, + { + "a": "PE 20348 (Server 2022): le check SYSTEMROOT lit DriverDatabase\\SystemRoot - le fix = la cle OU l'index 2 natif", + "b": "iso_index=2 = le fix validé du check SYSTEMROOT 20348 (PE 2022 booté); le front suivant = le launcher du setup", + "similarity": 0.37 + }, + { + "a": "Relances orchestrator: une seule relance, pas de rafale", + "b": "Relances orchestrator: verdict déjà posté = jamais de rafale, attendre le détenteur de la balle", + "similarity": 0.23 + }, + { + "a": "Attendre une publication npm : curl --retry ne re-fetch pas un 200 périmé", + "b": "curl --retry sur un HEAD 404 ne bloque pas: la version-doc endpoint fait le vrai retry borné", + "similarity": 0.2 + }, + { + "a": "mesh_send cross-host: peer exige le node id COMPLET (uuid), pas la forme courte", + "b": "mesh_send retourne une forme instable - ne jamais chaîner mesh_wait sur r.id", + "similarity": 0.21 + }, + { + "a": "curl --retry sur un HEAD 404 ne bloque pas: la version-doc endpoint fait le vrai retry borné", + "b": "curl --retry ne retarde PAS un 404 GET: wget --retry-on-http-error=404 --waitretry = le vrai attente bornée", + "similarity": 0.29 + }, + { + "a": "rtk avale tout check à exit code (tsc, biome, vitest) — rtk proxy + echo exit=$?", + "b": "biome: $schema version doit égaler la version CLI — et rtk peut lire un check rouge comme EXIT=0", + "similarity": 0.2 + } + ] +} \ No newline at end of file diff --git a/tests/inventory-perf.test.ts b/tests/inventory-perf.test.ts index b2af263..d9954a0 100644 --- a/tests/inventory-perf.test.ts +++ b/tests/inventory-perf.test.ts @@ -98,9 +98,13 @@ describe("inventory freshness cost", () => { ops.save( { kind: "lesson", + // distinct=true: the synthetic titles share tokens exactly ("lesson" + + // the same 40-char filler) - the test exercises the freshness cost, + // not the fuzzy merge. title: `lesson ${i} ${"t".repeat(40)}`, body: "b", paths: [`l${i}.txt`], + distinct: true, }, repo, undefined, diff --git a/tests/lib.store.test.ts b/tests/lib.store.test.ts index c135752..607bb72 100644 --- a/tests/lib.store.test.ts +++ b/tests/lib.store.test.ts @@ -1,4 +1,4 @@ -import { mkdtempSync, rmSync } from "node:fs"; +import { mkdtempSync, readFileSync, rmSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; @@ -815,3 +815,178 @@ describe("entry title folding", () => { db.close(); }); }); + +describe("the fuzzy lesson recurrence (0.26.3, the paraphrase merge)", () => { + const seed = (db: ReturnType, title: string, paths?: string[]) => { + const res = saveEntry(db, { + scope: "/home/logout", + kind: "lesson", + title, + body: "body", + tags: [], + ...(paths !== undefined ? { paths } : {}), + }); + return res; + }; + + it("exact re-record x2 -> same id, heat 2 (unchanged)", () => { + const db = openMemoryDb(join(dir, "t1.db")); + const first = seed(db, "git tag hangs on vim"); + const again = seed(db, "git tag hangs on vim"); + expect(again.entry.id).toBe(first.entry.id); + expect(again.entry.heat).toBe(2); + expect(again.created).toBe(false); + db.close(); + }); + + it("paraphrase re-record -> same id, heat 2, similarity 0.67, the FIRST title stored", () => { + const db = openMemoryDb(join(dir, "t2.db")); + seed(db, "git tag -m hangs waiting for the editor"); + const again = seed(db, "git tag hangs on the editor (vim)"); + expect(again.entry.id).not.toBe(""); + expect(again.entry.title).toBe("git tag -m hangs waiting for the editor"); + expect(again.entry.heat).toBe(2); + expect(again.merged?.similarity).toBeCloseTo(0.67, 2); + db.close(); + }); + + it("near-miss -> new id, heat 1", () => { + const db = openMemoryDb(join(dir, "t3.db")); + seed(db, "git tag hangs on the editor (vim)"); + const other = seed(db, "git push needs --force-with-lease after rebase"); + expect(other.merged).toBeUndefined(); + expect(other.entry.heat).toBe(1); // the fresh lesson = heat 1 + db.close(); + }); + + it("path bar: a shared path lowers the bar (0.43 with path merges, without = new)", () => { + const db = openMemoryDb(join(dir, "t4.db")); + seed(db, "wake hot loop on escalation refusal", ["src/lib/wake.ts"]); + const withPath = seed(db, "escalation refusal causes a write loop", ["src/lib/wake.ts"]); + expect(withPath.merged).toBeDefined(); + db.close(); + const db2 = openMemoryDb(join(dir, "t5.db")); + seed(db2, "wake hot loop on escalation refusal"); + const noPath = seed(db2, "escalation refusal causes a write loop"); + expect(noPath.merged).toBeUndefined(); + db2.close(); + }); + + it("negation never merges", () => { + const db = openMemoryDb(join(dir, "t6.db")); + seed(db, "use pnpm for installs"); + const negated = seed(db, "don't use pnpm for installs"); + expect(negated.merged).toBeUndefined(); + db.close(); + }); + + it("distinct=true on the paraphrase -> new id, heat 1", () => { + const db = openMemoryDb(join(dir, "t7.db")); + seed(db, "git tag -m hangs waiting for the editor"); + const distinct = saveEntry(db, { + scope: "/home/logout", + kind: "lesson", + title: "git tag hangs on the editor (vim)", + body: "body", + tags: [], + distinct: true, + }); + expect(distinct.merged).toBeUndefined(); + expect(distinct.created).toBe(true); + db.close(); + }); + + it("kind note paraphrase -> never merged", () => { + const db = openMemoryDb(join(dir, "t8.db")); + saveEntry(db, { + scope: "/home/logout", + kind: "note", + title: "git tag -m hangs waiting for the editor", + body: "body", + tags: [], + }); + const again = saveEntry(db, { + scope: "/home/logout", + kind: "note", + title: "git tag hangs on the editor (vim)", + body: "body", + tags: [], + }); + expect(again.merged).toBeUndefined(); + expect(again.created).toBe(true); + db.close(); + }); + + it("accents: évite le cache vs evite le cache = merged", () => { + const db = openMemoryDb(join(dir, "t9.db")); + seed(db, "évite le cache npm"); + const plain = seed(db, "evite le cache npm"); + expect(plain.merged).toBeDefined(); + expect(plain.entry.title).toBe("évite le cache npm"); + db.close(); + }); +}); + +describe("the lesson-pairs calibration fixture (0.26.3)", () => { + const fixture = JSON.parse( + readFileSync(join(import.meta.dirname, "fixtures", "lesson-pairs.json"), "utf8"), + ) as { + same: Array<{ a: string; b: string; paths?: string[]; similarity: number }>; + nearMiss: Array<{ a: string; b: string; paths?: string[]; similarity: number }>; + }; + + it("every SAME pair merges, no NEAR-MISS pair merges", () => { + const db = openMemoryDb(join(dir, "calib.db")); + const mergedTitles: string[] = []; + const scores: number[] = []; + for (const pair of fixture.same) { + saveEntry(db, { + scope: "/home/logout", + kind: "lesson", + title: pair.a, + body: "x", + tags: [], + ...(pair.paths !== undefined ? { paths: pair.paths } : {}), + }); + const res = saveEntry(db, { + scope: "/home/logout", + kind: "lesson", + title: pair.b, + body: "x", + tags: [], + ...(pair.paths !== undefined ? { paths: pair.paths } : {}), + }); + expect(res.merged, `SAME pair should merge: ${pair.a} ~ ${pair.b}`).toBeDefined(); + if (res.merged) { + scores.push(res.merged.similarity); + mergedTitles.push(res.entry.title); + } + } + for (const pair of fixture.nearMiss) { + saveEntry(db, { + scope: "/home/logout", + kind: "lesson", + title: pair.a, + body: "x", + tags: [], + ...(pair.paths !== undefined ? { paths: pair.paths } : {}), + }); + const res = saveEntry(db, { + scope: "/home/logout", + kind: "lesson", + title: pair.b, + body: "x", + tags: [], + ...(pair.paths !== undefined ? { paths: pair.paths } : {}), + }); + expect(res.merged, `NEAR-MISS must NOT merge: ${pair.a} ~ ${pair.b}`).toBeUndefined(); + } + // The score distribution: the console prints it, the CI log keeps it. + const sorted = [...scores].sort((a, b) => a - b); + const pct = (p: number) => sorted[Math.min(sorted.length - 1, Math.floor(p * sorted.length))]; + console.log( + `fixture scores n=${sorted.length} min=${sorted[0]?.toFixed(2)} p25=${pct(0.25)?.toFixed(2)} p50=${pct(0.5)?.toFixed(2)} p75=${pct(0.75)?.toFixed(2)} max=${sorted.at(-1)?.toFixed(2)}`, + ); + db.close(); + }); +}); diff --git a/tests/memory-ops.test.ts b/tests/memory-ops.test.ts index be37aa5..5981a72 100644 --- a/tests/memory-ops.test.ts +++ b/tests/memory-ops.test.ts @@ -34,7 +34,9 @@ describe("memory ops", () => { const { ops, close } = store(); for (let i = 1; i <= 5; i += 1) { const result = ops.save( - { kind: "lesson", title: `burst lesson ${i}`, body: "x" }, + // distinct=true: the synthetic titles ("burst lesson N") are exactly at + // the 0.5 Jaccard bar - the test exercises the cap, not the fuzzy merge. + { kind: "lesson", title: `burst lesson ${i}`, body: "x", distinct: true }, "/w", "reflection", ); @@ -282,7 +284,7 @@ describe("memory inventory", () => { it("the cap evicts the coldest facts first while every lesson stays", async () => { const { ops, dbPath, getDb, close } = store(); - ops.save({ kind: "lesson", title: "kept lesson one", body: "rule one" }, "/w"); + ops.save({ kind: "lesson", title: "kept lesson one", body: "rule one", distinct: true }, "/w"); for (let i = 0; i < 80; i += 1) { ops.save( { @@ -293,7 +295,7 @@ describe("memory inventory", () => { "/w", ); } - ops.save({ kind: "lesson", title: "kept lesson two", body: "rule two" }, "/w"); + ops.save({ kind: "lesson", title: "kept lesson two", body: "rule two", distinct: true }, "/w"); const inventory = (await memoryInventory(getDb, dbPath, "/w")) as string; expect(inventory).toContain("kept lesson one"); @@ -405,3 +407,19 @@ describe("the FTS search rides a fresh ad-hoc connection (0.26.2)", () => { db.close(); }); }); + +describe("the fuzzy merge report (0.26.3)", () => { + it("the save text names the merge and drops the similar-entries suggestion", () => { + const { ops, close } = store(); + ops.save({ kind: "lesson", title: "git tag -m hangs waiting for the editor", body: "x" }, "/w"); + const result = ops.save( + { kind: "lesson", title: "git tag hangs on the editor (vim)", body: "x" }, + "/w", + ); + expect(result).toContain("merged into"); + expect(result).toContain("similarity 0.67"); + expect(result).toContain("heat 2"); + expect(result).not.toContain("similar entries"); + close(); + }); +}); From 9488c81649e0c812e706bfed858be0d596b02d10 Mon Sep 17 00:00:00 2001 From: log0u7 <70974447+log0u7@users.noreply.github.com> Date: Mon, 30 Nov 2026 16:02:10 +0100 Subject: [PATCH 2/5] style: the fixture JSON = the biome canonical form --- tests/fixtures/lesson-pairs.json | 722 +++++++++++++++---------------- 1 file changed, 358 insertions(+), 364 deletions(-) diff --git a/tests/fixtures/lesson-pairs.json b/tests/fixtures/lesson-pairs.json index 2bb92dc..f8ed6bf 100644 --- a/tests/fixtures/lesson-pairs.json +++ b/tests/fixtures/lesson-pairs.json @@ -1,365 +1,359 @@ { - "same": [ - { - "a": "Jenkins PR check routine: notifications + reviews + threads, not just PR comments", - "b": "Check routine must include last PR comments, not only reviews/notifications", - "similarity": 0.5 - }, - { - "a": "Jenkins PR check routine: notifications + reviews + threads, not just PR comments", - "b": "Check routine: notifications + reviews + review threads + PR comments, never comments-only", - "similarity": 0.54 - }, - { - "a": "Check routine must include last PR comments, not only reviews/notifications", - "b": "Check routine: notifications + reviews + review threads + PR comments, never comments-only", - "similarity": 0.5 - }, - { - "a": "virtio-win ISO: layout asymmétrique + pruner inf/cat/sys casse NetKVM (netkvmp.exe requis par l'inf)", - "b": "virtio-win pack: PRUNER inf/cat/sys only casse NetKVM - netkvmp.exe est reference par l'inf (drvload 0x80070002)", - "similarity": 0.53 - }, - { - "a": "git tag nu réécrit par hook rtk en annoté+éditeur vim — rtk proxy git tag -a -m = chemin brut sanctionné", - "b": "opencode-mesh: git tag nu réécrit par rtk en annoté+vim — échapper via rtk proxy git tag -a -m", - "paths": [ - "projets/github/logout/opencode-mesh" - ], - "similarity": 0.5 - }, - { - "a": "OpenCode 2 host resolves @opencode/plugin, not @opencode-ai/plugin", - "b": "@opencode/plugin, not @opencode-ai/plugin OpenCode host resolves", - "similarity": 1 - }, - { - "a": "glab CLI flags that do not exist (avoid re-testing)", - "b": "not exist (avoid re-testing) glab CLI flags that", - "similarity": 1 - }, - { - "a": "Ansible role pinning: manager tag must equal the myvim gitlink", - "b": "must equal the myvim gitlink Ansible role pinning: manager tag", - "similarity": 1 - }, - { - "a": "gpu3080 llama.cpp service chain: router wedge, firewall per-port, ssh kills children", - "b": "firewall per-port, ssh kills children gpu3080 llama.cpp service chain: router wedge,", - "similarity": 1 - }, - { - "a": "bf-train nssm: --resume cross-model checkpoint = swap hell; explicit --output is the safe pattern", - "b": "hell; explicit --output the safe pattern bf-train nssm: --resume cross-model checkpoint swap", - "similarity": 1 - }, - { - "a": "Lesson: admin-merges without CI gate piled 4 regressions on main; local pytest pegs the laptop", - "b": "main; local pytest pegs the laptop Lesson: admin-merges without gate piled regressions", - "similarity": 1 - }, - { - "a": "OpenAI/httpx float timeout does NOT bound total request time - drip-feed streams hang pipelines", - "b": "request time drip-feed streams hang pipelines OpenAI/httpx float timeout does NOT bound total", - "similarity": 1 - }, - { - "a": "Two sibling subagents raced on one BrainForge worktree; disk-truth reconciliation avoided damage", - "b": "worktree; disk-truth reconciliation avoided damage Two sibling subagents raced one BrainForge", - "similarity": 1 - }, - { - "a": "Concurrent agent collision on shared BrainForge worktree (PR 63)", - "b": "BrainForge worktree (PR 63) Concurrent agent collision shared", - "similarity": 1 - }, - { - "a": "Completion-only loss fixed training but NOT generation: task-eval still accuracy 0", - "b": "NOT generation: task-eval still accuracy Completion-only loss fixed training but", - "similarity": 1 - }, - { - "a": "Task-eval accuracy 0 root cause chain: max_length truncation + template mismatch + flagless corpus", - "b": "truncation template mismatch flagless corpus Task-eval accuracy root cause chain: max_length", - "similarity": 1 - }, - { - "a": "Flag prediction probe: the model recites training flags or hallucinates - execution is the only truth path", - "b": "flags hallucinates execution the only truth path Flag prediction probe: the model recites training", - "similarity": 1 - }, - { - "a": "augure corpus guard: teach a new layout under the existing technique name", - "b": "under the existing technique name augure corpus guard: teach new layout", - "similarity": 1 - }, - { - "a": "OpenWrt 25.12 uci network ipaddr needs CIDR notation", - "b": "ipaddr needs CIDR notation OpenWrt 25.12 uci network", - "similarity": 1 - }, - { - "a": "brainforge PR merge: squash only, merge commits blocked at repo level", - "b": "commits blocked repo level brainforge merge: squash only, merge", - "similarity": 1 - }, - { - "a": "Dual interface same subnet = blackhole + ARP flux false positives", - "b": "ARP flux false positives Dual interface same subnet blackhole", - "similarity": 1 - }, - { - "a": "augure release.yml: push-gems failure after successful publish is a false negative", - "b": "successful publish false negative augure release.yml: push-gems failure after", - "similarity": 1 - }, - { - "a": "Id-based contamination audits miss semantic contamination when id namespaces differ (brainforge MR5)", - "b": "when namespaces differ (brainforge MR5) Id-based contamination audits miss semantic contamination", - "similarity": 1 - }, - { - "a": "lictor rspec full-suite hangs but every spec file passes individually; handoff mode is expected without ronin-exploits", - "b": "passes individually; handoff mode expected without ronin-exploits lictor rspec full-suite hangs but every spec file", - "similarity": 1 - }, - { - "a": "MR6 lesson: best checkpoint (epoch 2, eval_loss 5.2e-05) was never saved; next retrain: 3 epochs + per-epoch saves", - "b": "never saved; next retrain: epochs per-epoch saves MR6 lesson: best checkpoint (epoch eval_loss 5.2e-05) was", - "similarity": 1 - }, - { - "a": "OpenCode 2 host resolves @opencode/plugin, not @opencode-ai/plugin", - "b": "@opencode/plugin, not @opencode-ai/plugin OpenCode host resolves", - "similarity": 1 - }, - { - "a": "glab CLI flags that do not exist (avoid re-testing)", - "b": "not exist (avoid re-testing) glab CLI flags that", - "similarity": 1 - }, - { - "a": "Ansible role pinning: manager tag must equal the myvim gitlink", - "b": "must equal the myvim gitlink Ansible role pinning: manager tag", - "similarity": 1 - }, - { - "a": "gpu3080 llama.cpp service chain: router wedge, firewall per-port, ssh kills children", - "b": "firewall per-port, ssh kills children gpu3080 llama.cpp service chain: router wedge,", - "similarity": 1 - }, - { - "a": "bf-train nssm: --resume cross-model checkpoint = swap hell; explicit --output is the safe pattern", - "b": "hell; explicit --output the safe pattern bf-train nssm: --resume cross-model checkpoint swap", - "similarity": 1 - }, - { - "a": "Lesson: admin-merges without CI gate piled 4 regressions on main; local pytest pegs the laptop", - "b": "main; local pytest pegs the laptop Lesson: admin-merges without gate piled regressions", - "similarity": 1 - }, - { - "a": "OpenAI/httpx float timeout does NOT bound total request time - drip-feed streams hang pipelines", - "b": "request time drip-feed streams hang pipelines OpenAI/httpx float timeout does NOT bound total", - "similarity": 1 - }, - { - "a": "Two sibling subagents raced on one BrainForge worktree; disk-truth reconciliation avoided damage", - "b": "worktree; disk-truth reconciliation avoided damage Two sibling subagents raced one BrainForge", - "similarity": 1 - }, - { - "a": "Concurrent agent collision on shared BrainForge worktree (PR 63)", - "b": "BrainForge worktree (PR 63) Concurrent agent collision shared", - "similarity": 1 - }, - { - "a": "Completion-only loss fixed training but NOT generation: task-eval still accuracy 0", - "b": "NOT generation: task-eval still accuracy Completion-only loss fixed training but", - "similarity": 1 - }, - { - "a": "Task-eval accuracy 0 root cause chain: max_length truncation + template mismatch + flagless corpus", - "b": "truncation template mismatch flagless corpus Task-eval accuracy root cause chain: max_length", - "similarity": 1 - }, - { - "a": "Flag prediction probe: the model recites training flags or hallucinates - execution is the only truth path", - "b": "flags hallucinates execution the only truth path Flag prediction probe: the model recites training", - "similarity": 1 - }, - { - "a": "augure corpus guard: teach a new layout under the existing technique name", - "b": "under the existing technique name augure corpus guard: teach new layout", - "similarity": 1 - }, - { - "a": "OpenWrt 25.12 uci network ipaddr needs CIDR notation", - "b": "ipaddr needs CIDR notation OpenWrt 25.12 uci network", - "similarity": 1 - }, - { - "a": "brainforge PR merge: squash only, merge commits blocked at repo level", - "b": "commits blocked repo level brainforge merge: squash only, merge", - "similarity": 1 - }, - { - "a": "Dual interface same subnet = blackhole + ARP flux false positives", - "b": "ARP flux false positives Dual interface same subnet blackhole", - "similarity": 1 - }, - { - "a": "augure release.yml: push-gems failure after successful publish is a false negative", - "b": "successful publish false negative augure release.yml: push-gems failure after", - "similarity": 1 - }, - { - "a": "Id-based contamination audits miss semantic contamination when id namespaces differ (brainforge MR5)", - "b": "when namespaces differ (brainforge MR5) Id-based contamination audits miss semantic contamination", - "similarity": 1 - }, - { - "a": "lictor rspec full-suite hangs but every spec file passes individually; handoff mode is expected without ronin-exploits", - "b": "passes individually; handoff mode expected without ronin-exploits lictor rspec full-suite hangs but every spec file", - "similarity": 1 - }, - { - "a": "MR6 lesson: best checkpoint (epoch 2, eval_loss 5.2e-05) was never saved; next retrain: 3 epochs + per-epoch saves", - "b": "never saved; next retrain: epochs per-epoch saves MR6 lesson: best checkpoint (epoch eval_loss 5.2e-05) was", - "similarity": 1 - } - ], - "nearMiss": [ - { - "a": "MR6-v2 30-rep bench: global gain is noise, orw-001 regression is the signal", - "b": "MR6-v2 30-rep bench: clean subset signal real but diluted", - "similarity": 0.35 - }, - { - "a": "quartermaster e2e: helm upgrade manuel DOIT inclure les --set net.* (sinon Kea subnet 10.0.0.0/24)", - "b": "quartermaster: helm upgrade net partiel = réservations Kea effacées (2e occurrence) + merge ff bloqué par fichier dirty", - "similarity": 0.21 - }, - { - "a": "gpu3080: base64-via-echo push of files >~2KB works, scp into WSL /home fails; nohup in wsl -e bash -c dies with ssh", - "b": "scp to gpu3080 lands on Windows side; pipe files through ssh wsl cat instead", - "similarity": 0.23 - }, - { - "a": "auth-forward review BLOCK: foreman tgz périmé flap réel (4/6 renders abort), REMOTE_USER gap vérifié source Foreman", - "b": "auth Phase B: Foreman SSO via forwardAuth — le gap REMOTE_USER et le design livré (oauth2-proxy)", - "similarity": 0.22 - }, - { - "a": "roles CI: template-roles.yml rules ne matchent pas molecule/ - le retry relance l'ancien sha", - "b": "Standalone CI job: re-declarer les logins registry que la template ne donne pas", - "similarity": 0.2 - }, - { - "a": "git tag hangs in non-interactive shells: tag.gpgSign=true opens vim", - "b": "git tag interactif: tag.gpgSign=true global force l'éditeur, toujours -m", - "similarity": 0.27 - }, - { - "a": "json 3.x incompatible Rails 7.0: quirks_mode ArgumentError casse le boot foreman", - "b": "json 3.x casse ActiveSupport 7.0 (quirks_mode): pin < 3; trivy aveugle aux incompat API", - "similarity": 0.27 - }, - { - "a": "smb k8s pod: runc gives no effective caps to non-root; smbd must run as root to bind 445", - "b": "samba k8s: bind 445 = root (runc, pas de cap non-root) + emptyDir masque les dirs image", - "similarity": 0.27 - }, - { - "a": "PIPELINE RELEASE (4 incidents): verifier version+commit du tag AVANT push, et ne jamais faire gh pr merge sans numero", - "b": "Tag: verifier MR merged ET mon merge commit dans origin/main, jamais tagguer par fallback", - "similarity": 0.21 - }, - { - "a": "PIPELINE RELEASE (4 incidents): verifier version+commit du tag AVANT push, et ne jamais faire gh pr merge sans numero", - "b": "Release chain: le push de tag JAMAIS chaine derriere un merge qui peut refuser — les 2 incidents du 27/11", - "similarity": 0.25 - }, - { - "a": "git commit: TOUJOURS -m — le commit sans message ouvre vim en bloquant", - "b": "Repos Greg = tag.forceSignAnnotated: git tag SANS -m ouvre l'editeur et bloque la chaine", - "similarity": 0.2 - }, - { - "a": "Périmètres: l'édition d'AGENTS.md = opencode-config, pas les sessions plugin", - "b": "opencode-config: commit bodies via git commit -F, pas -m à l'oeil", - "similarity": 0.23 - }, - { - "a": "rotation keycloak-client-secrets: env-from-secret pods ne rechargent pas (restart requis)", - "b": "Rotation de secrets k8s: envFrom est resolu au demarrage du pod - helm upgrade de secret NE redemarre PAS les pods", - "similarity": 0.3 - }, - { - "a": "PE 20348 check SYSTEMROOT: lit hors SYSTEM\\Setup\\SystemRoot (matrice hive epuisee), fix = build", - "b": "PE 20348 (Server 2022): le check SYSTEMROOT lit DriverDatabase\\SystemRoot - le fix = la cle OU l'index 2 natif", - "similarity": 0.32 - }, - { - "a": "PE 20348 check SYSTEMROOT: lit hors SYSTEM\\Setup\\SystemRoot (matrice hive epuisee), fix = build", - "b": "check SYSTEMROOT du kernel 20348 lit DriverDatabase - supersedes la version partielle", - "similarity": 0.22 - }, - { - "a": "PE 20348 check SYSTEMROOT: lit hors SYSTEM\\Setup\\SystemRoot (matrice hive epuisee), fix = build", - "b": "PE 20348 SYSTEMROOT: le check = BCD winload path vs layout extrait — le hive n'y est pour rien", - "paths": [ - "deploy/helm/quartermaster/charts/media/files/pe-postbuild.sh" - ], - "similarity": 0.25 - }, - { - "a": "PE 20348 check SYSTEMROOT: lit hors SYSTEM\\Setup\\SystemRoot (matrice hive epuisee), fix = build", - "b": "iso_index=2 = le fix validé du check SYSTEMROOT 20348 (PE 2022 booté); le front suivant = le launcher du setup", - "paths": [ - "deploy/helm/quartermaster/charts/media/files/pe-postbuild.sh" - ], - "similarity": 0.29 - }, - { - "a": "PE 20348 (Server 2022): le check SYSTEMROOT lit DriverDatabase\\SystemRoot - le fix = la cle OU l'index 2 natif", - "b": "check SYSTEMROOT du kernel 20348 lit DriverDatabase - supersedes la version partielle", - "similarity": 0.31 - }, - { - "a": "PE 20348 (Server 2022): le check SYSTEMROOT lit DriverDatabase\\SystemRoot - le fix = la cle OU l'index 2 natif", - "b": "PE 20348 SYSTEMROOT: le check = BCD winload path vs layout extrait — le hive n'y est pour rien", - "similarity": 0.2 - }, - { - "a": "PE 20348 (Server 2022): le check SYSTEMROOT lit DriverDatabase\\SystemRoot - le fix = la cle OU l'index 2 natif", - "b": "iso_index=2 = le fix validé du check SYSTEMROOT 20348 (PE 2022 booté); le front suivant = le launcher du setup", - "similarity": 0.37 - }, - { - "a": "Relances orchestrator: une seule relance, pas de rafale", - "b": "Relances orchestrator: verdict déjà posté = jamais de rafale, attendre le détenteur de la balle", - "similarity": 0.23 - }, - { - "a": "Attendre une publication npm : curl --retry ne re-fetch pas un 200 périmé", - "b": "curl --retry sur un HEAD 404 ne bloque pas: la version-doc endpoint fait le vrai retry borné", - "similarity": 0.2 - }, - { - "a": "mesh_send cross-host: peer exige le node id COMPLET (uuid), pas la forme courte", - "b": "mesh_send retourne une forme instable - ne jamais chaîner mesh_wait sur r.id", - "similarity": 0.21 - }, - { - "a": "curl --retry sur un HEAD 404 ne bloque pas: la version-doc endpoint fait le vrai retry borné", - "b": "curl --retry ne retarde PAS un 404 GET: wget --retry-on-http-error=404 --waitretry = le vrai attente bornée", - "similarity": 0.29 - }, - { - "a": "rtk avale tout check à exit code (tsc, biome, vitest) — rtk proxy + echo exit=$?", - "b": "biome: $schema version doit égaler la version CLI — et rtk peut lire un check rouge comme EXIT=0", - "similarity": 0.2 - } - ] -} \ No newline at end of file + "same": [ + { + "a": "Jenkins PR check routine: notifications + reviews + threads, not just PR comments", + "b": "Check routine must include last PR comments, not only reviews/notifications", + "similarity": 0.5 + }, + { + "a": "Jenkins PR check routine: notifications + reviews + threads, not just PR comments", + "b": "Check routine: notifications + reviews + review threads + PR comments, never comments-only", + "similarity": 0.54 + }, + { + "a": "Check routine must include last PR comments, not only reviews/notifications", + "b": "Check routine: notifications + reviews + review threads + PR comments, never comments-only", + "similarity": 0.5 + }, + { + "a": "virtio-win ISO: layout asymmétrique + pruner inf/cat/sys casse NetKVM (netkvmp.exe requis par l'inf)", + "b": "virtio-win pack: PRUNER inf/cat/sys only casse NetKVM - netkvmp.exe est reference par l'inf (drvload 0x80070002)", + "similarity": 0.53 + }, + { + "a": "git tag nu réécrit par hook rtk en annoté+éditeur vim — rtk proxy git tag -a -m = chemin brut sanctionné", + "b": "opencode-mesh: git tag nu réécrit par rtk en annoté+vim — échapper via rtk proxy git tag -a -m", + "paths": ["projets/github/logout/opencode-mesh"], + "similarity": 0.5 + }, + { + "a": "OpenCode 2 host resolves @opencode/plugin, not @opencode-ai/plugin", + "b": "@opencode/plugin, not @opencode-ai/plugin OpenCode host resolves", + "similarity": 1 + }, + { + "a": "glab CLI flags that do not exist (avoid re-testing)", + "b": "not exist (avoid re-testing) glab CLI flags that", + "similarity": 1 + }, + { + "a": "Ansible role pinning: manager tag must equal the myvim gitlink", + "b": "must equal the myvim gitlink Ansible role pinning: manager tag", + "similarity": 1 + }, + { + "a": "gpu3080 llama.cpp service chain: router wedge, firewall per-port, ssh kills children", + "b": "firewall per-port, ssh kills children gpu3080 llama.cpp service chain: router wedge,", + "similarity": 1 + }, + { + "a": "bf-train nssm: --resume cross-model checkpoint = swap hell; explicit --output is the safe pattern", + "b": "hell; explicit --output the safe pattern bf-train nssm: --resume cross-model checkpoint swap", + "similarity": 1 + }, + { + "a": "Lesson: admin-merges without CI gate piled 4 regressions on main; local pytest pegs the laptop", + "b": "main; local pytest pegs the laptop Lesson: admin-merges without gate piled regressions", + "similarity": 1 + }, + { + "a": "OpenAI/httpx float timeout does NOT bound total request time - drip-feed streams hang pipelines", + "b": "request time drip-feed streams hang pipelines OpenAI/httpx float timeout does NOT bound total", + "similarity": 1 + }, + { + "a": "Two sibling subagents raced on one BrainForge worktree; disk-truth reconciliation avoided damage", + "b": "worktree; disk-truth reconciliation avoided damage Two sibling subagents raced one BrainForge", + "similarity": 1 + }, + { + "a": "Concurrent agent collision on shared BrainForge worktree (PR 63)", + "b": "BrainForge worktree (PR 63) Concurrent agent collision shared", + "similarity": 1 + }, + { + "a": "Completion-only loss fixed training but NOT generation: task-eval still accuracy 0", + "b": "NOT generation: task-eval still accuracy Completion-only loss fixed training but", + "similarity": 1 + }, + { + "a": "Task-eval accuracy 0 root cause chain: max_length truncation + template mismatch + flagless corpus", + "b": "truncation template mismatch flagless corpus Task-eval accuracy root cause chain: max_length", + "similarity": 1 + }, + { + "a": "Flag prediction probe: the model recites training flags or hallucinates - execution is the only truth path", + "b": "flags hallucinates execution the only truth path Flag prediction probe: the model recites training", + "similarity": 1 + }, + { + "a": "augure corpus guard: teach a new layout under the existing technique name", + "b": "under the existing technique name augure corpus guard: teach new layout", + "similarity": 1 + }, + { + "a": "OpenWrt 25.12 uci network ipaddr needs CIDR notation", + "b": "ipaddr needs CIDR notation OpenWrt 25.12 uci network", + "similarity": 1 + }, + { + "a": "brainforge PR merge: squash only, merge commits blocked at repo level", + "b": "commits blocked repo level brainforge merge: squash only, merge", + "similarity": 1 + }, + { + "a": "Dual interface same subnet = blackhole + ARP flux false positives", + "b": "ARP flux false positives Dual interface same subnet blackhole", + "similarity": 1 + }, + { + "a": "augure release.yml: push-gems failure after successful publish is a false negative", + "b": "successful publish false negative augure release.yml: push-gems failure after", + "similarity": 1 + }, + { + "a": "Id-based contamination audits miss semantic contamination when id namespaces differ (brainforge MR5)", + "b": "when namespaces differ (brainforge MR5) Id-based contamination audits miss semantic contamination", + "similarity": 1 + }, + { + "a": "lictor rspec full-suite hangs but every spec file passes individually; handoff mode is expected without ronin-exploits", + "b": "passes individually; handoff mode expected without ronin-exploits lictor rspec full-suite hangs but every spec file", + "similarity": 1 + }, + { + "a": "MR6 lesson: best checkpoint (epoch 2, eval_loss 5.2e-05) was never saved; next retrain: 3 epochs + per-epoch saves", + "b": "never saved; next retrain: epochs per-epoch saves MR6 lesson: best checkpoint (epoch eval_loss 5.2e-05) was", + "similarity": 1 + }, + { + "a": "OpenCode 2 host resolves @opencode/plugin, not @opencode-ai/plugin", + "b": "@opencode/plugin, not @opencode-ai/plugin OpenCode host resolves", + "similarity": 1 + }, + { + "a": "glab CLI flags that do not exist (avoid re-testing)", + "b": "not exist (avoid re-testing) glab CLI flags that", + "similarity": 1 + }, + { + "a": "Ansible role pinning: manager tag must equal the myvim gitlink", + "b": "must equal the myvim gitlink Ansible role pinning: manager tag", + "similarity": 1 + }, + { + "a": "gpu3080 llama.cpp service chain: router wedge, firewall per-port, ssh kills children", + "b": "firewall per-port, ssh kills children gpu3080 llama.cpp service chain: router wedge,", + "similarity": 1 + }, + { + "a": "bf-train nssm: --resume cross-model checkpoint = swap hell; explicit --output is the safe pattern", + "b": "hell; explicit --output the safe pattern bf-train nssm: --resume cross-model checkpoint swap", + "similarity": 1 + }, + { + "a": "Lesson: admin-merges without CI gate piled 4 regressions on main; local pytest pegs the laptop", + "b": "main; local pytest pegs the laptop Lesson: admin-merges without gate piled regressions", + "similarity": 1 + }, + { + "a": "OpenAI/httpx float timeout does NOT bound total request time - drip-feed streams hang pipelines", + "b": "request time drip-feed streams hang pipelines OpenAI/httpx float timeout does NOT bound total", + "similarity": 1 + }, + { + "a": "Two sibling subagents raced on one BrainForge worktree; disk-truth reconciliation avoided damage", + "b": "worktree; disk-truth reconciliation avoided damage Two sibling subagents raced one BrainForge", + "similarity": 1 + }, + { + "a": "Concurrent agent collision on shared BrainForge worktree (PR 63)", + "b": "BrainForge worktree (PR 63) Concurrent agent collision shared", + "similarity": 1 + }, + { + "a": "Completion-only loss fixed training but NOT generation: task-eval still accuracy 0", + "b": "NOT generation: task-eval still accuracy Completion-only loss fixed training but", + "similarity": 1 + }, + { + "a": "Task-eval accuracy 0 root cause chain: max_length truncation + template mismatch + flagless corpus", + "b": "truncation template mismatch flagless corpus Task-eval accuracy root cause chain: max_length", + "similarity": 1 + }, + { + "a": "Flag prediction probe: the model recites training flags or hallucinates - execution is the only truth path", + "b": "flags hallucinates execution the only truth path Flag prediction probe: the model recites training", + "similarity": 1 + }, + { + "a": "augure corpus guard: teach a new layout under the existing technique name", + "b": "under the existing technique name augure corpus guard: teach new layout", + "similarity": 1 + }, + { + "a": "OpenWrt 25.12 uci network ipaddr needs CIDR notation", + "b": "ipaddr needs CIDR notation OpenWrt 25.12 uci network", + "similarity": 1 + }, + { + "a": "brainforge PR merge: squash only, merge commits blocked at repo level", + "b": "commits blocked repo level brainforge merge: squash only, merge", + "similarity": 1 + }, + { + "a": "Dual interface same subnet = blackhole + ARP flux false positives", + "b": "ARP flux false positives Dual interface same subnet blackhole", + "similarity": 1 + }, + { + "a": "augure release.yml: push-gems failure after successful publish is a false negative", + "b": "successful publish false negative augure release.yml: push-gems failure after", + "similarity": 1 + }, + { + "a": "Id-based contamination audits miss semantic contamination when id namespaces differ (brainforge MR5)", + "b": "when namespaces differ (brainforge MR5) Id-based contamination audits miss semantic contamination", + "similarity": 1 + }, + { + "a": "lictor rspec full-suite hangs but every spec file passes individually; handoff mode is expected without ronin-exploits", + "b": "passes individually; handoff mode expected without ronin-exploits lictor rspec full-suite hangs but every spec file", + "similarity": 1 + }, + { + "a": "MR6 lesson: best checkpoint (epoch 2, eval_loss 5.2e-05) was never saved; next retrain: 3 epochs + per-epoch saves", + "b": "never saved; next retrain: epochs per-epoch saves MR6 lesson: best checkpoint (epoch eval_loss 5.2e-05) was", + "similarity": 1 + } + ], + "nearMiss": [ + { + "a": "MR6-v2 30-rep bench: global gain is noise, orw-001 regression is the signal", + "b": "MR6-v2 30-rep bench: clean subset signal real but diluted", + "similarity": 0.35 + }, + { + "a": "quartermaster e2e: helm upgrade manuel DOIT inclure les --set net.* (sinon Kea subnet 10.0.0.0/24)", + "b": "quartermaster: helm upgrade net partiel = réservations Kea effacées (2e occurrence) + merge ff bloqué par fichier dirty", + "similarity": 0.21 + }, + { + "a": "gpu3080: base64-via-echo push of files >~2KB works, scp into WSL /home fails; nohup in wsl -e bash -c dies with ssh", + "b": "scp to gpu3080 lands on Windows side; pipe files through ssh wsl cat instead", + "similarity": 0.23 + }, + { + "a": "auth-forward review BLOCK: foreman tgz périmé flap réel (4/6 renders abort), REMOTE_USER gap vérifié source Foreman", + "b": "auth Phase B: Foreman SSO via forwardAuth — le gap REMOTE_USER et le design livré (oauth2-proxy)", + "similarity": 0.22 + }, + { + "a": "roles CI: template-roles.yml rules ne matchent pas molecule/ - le retry relance l'ancien sha", + "b": "Standalone CI job: re-declarer les logins registry que la template ne donne pas", + "similarity": 0.2 + }, + { + "a": "git tag hangs in non-interactive shells: tag.gpgSign=true opens vim", + "b": "git tag interactif: tag.gpgSign=true global force l'éditeur, toujours -m", + "similarity": 0.27 + }, + { + "a": "json 3.x incompatible Rails 7.0: quirks_mode ArgumentError casse le boot foreman", + "b": "json 3.x casse ActiveSupport 7.0 (quirks_mode): pin < 3; trivy aveugle aux incompat API", + "similarity": 0.27 + }, + { + "a": "smb k8s pod: runc gives no effective caps to non-root; smbd must run as root to bind 445", + "b": "samba k8s: bind 445 = root (runc, pas de cap non-root) + emptyDir masque les dirs image", + "similarity": 0.27 + }, + { + "a": "PIPELINE RELEASE (4 incidents): verifier version+commit du tag AVANT push, et ne jamais faire gh pr merge sans numero", + "b": "Tag: verifier MR merged ET mon merge commit dans origin/main, jamais tagguer par fallback", + "similarity": 0.21 + }, + { + "a": "PIPELINE RELEASE (4 incidents): verifier version+commit du tag AVANT push, et ne jamais faire gh pr merge sans numero", + "b": "Release chain: le push de tag JAMAIS chaine derriere un merge qui peut refuser — les 2 incidents du 27/11", + "similarity": 0.25 + }, + { + "a": "git commit: TOUJOURS -m — le commit sans message ouvre vim en bloquant", + "b": "Repos Greg = tag.forceSignAnnotated: git tag SANS -m ouvre l'editeur et bloque la chaine", + "similarity": 0.2 + }, + { + "a": "Périmètres: l'édition d'AGENTS.md = opencode-config, pas les sessions plugin", + "b": "opencode-config: commit bodies via git commit -F, pas -m à l'oeil", + "similarity": 0.23 + }, + { + "a": "rotation keycloak-client-secrets: env-from-secret pods ne rechargent pas (restart requis)", + "b": "Rotation de secrets k8s: envFrom est resolu au demarrage du pod - helm upgrade de secret NE redemarre PAS les pods", + "similarity": 0.3 + }, + { + "a": "PE 20348 check SYSTEMROOT: lit hors SYSTEM\\Setup\\SystemRoot (matrice hive epuisee), fix = build", + "b": "PE 20348 (Server 2022): le check SYSTEMROOT lit DriverDatabase\\SystemRoot - le fix = la cle OU l'index 2 natif", + "similarity": 0.32 + }, + { + "a": "PE 20348 check SYSTEMROOT: lit hors SYSTEM\\Setup\\SystemRoot (matrice hive epuisee), fix = build", + "b": "check SYSTEMROOT du kernel 20348 lit DriverDatabase - supersedes la version partielle", + "similarity": 0.22 + }, + { + "a": "PE 20348 check SYSTEMROOT: lit hors SYSTEM\\Setup\\SystemRoot (matrice hive epuisee), fix = build", + "b": "PE 20348 SYSTEMROOT: le check = BCD winload path vs layout extrait — le hive n'y est pour rien", + "paths": ["deploy/helm/quartermaster/charts/media/files/pe-postbuild.sh"], + "similarity": 0.25 + }, + { + "a": "PE 20348 check SYSTEMROOT: lit hors SYSTEM\\Setup\\SystemRoot (matrice hive epuisee), fix = build", + "b": "iso_index=2 = le fix validé du check SYSTEMROOT 20348 (PE 2022 booté); le front suivant = le launcher du setup", + "paths": ["deploy/helm/quartermaster/charts/media/files/pe-postbuild.sh"], + "similarity": 0.29 + }, + { + "a": "PE 20348 (Server 2022): le check SYSTEMROOT lit DriverDatabase\\SystemRoot - le fix = la cle OU l'index 2 natif", + "b": "check SYSTEMROOT du kernel 20348 lit DriverDatabase - supersedes la version partielle", + "similarity": 0.31 + }, + { + "a": "PE 20348 (Server 2022): le check SYSTEMROOT lit DriverDatabase\\SystemRoot - le fix = la cle OU l'index 2 natif", + "b": "PE 20348 SYSTEMROOT: le check = BCD winload path vs layout extrait — le hive n'y est pour rien", + "similarity": 0.2 + }, + { + "a": "PE 20348 (Server 2022): le check SYSTEMROOT lit DriverDatabase\\SystemRoot - le fix = la cle OU l'index 2 natif", + "b": "iso_index=2 = le fix validé du check SYSTEMROOT 20348 (PE 2022 booté); le front suivant = le launcher du setup", + "similarity": 0.37 + }, + { + "a": "Relances orchestrator: une seule relance, pas de rafale", + "b": "Relances orchestrator: verdict déjà posté = jamais de rafale, attendre le détenteur de la balle", + "similarity": 0.23 + }, + { + "a": "Attendre une publication npm : curl --retry ne re-fetch pas un 200 périmé", + "b": "curl --retry sur un HEAD 404 ne bloque pas: la version-doc endpoint fait le vrai retry borné", + "similarity": 0.2 + }, + { + "a": "mesh_send cross-host: peer exige le node id COMPLET (uuid), pas la forme courte", + "b": "mesh_send retourne une forme instable - ne jamais chaîner mesh_wait sur r.id", + "similarity": 0.21 + }, + { + "a": "curl --retry sur un HEAD 404 ne bloque pas: la version-doc endpoint fait le vrai retry borné", + "b": "curl --retry ne retarde PAS un 404 GET: wget --retry-on-http-error=404 --waitretry = le vrai attente bornée", + "similarity": 0.29 + }, + { + "a": "rtk avale tout check à exit code (tsc, biome, vitest) — rtk proxy + echo exit=$?", + "b": "biome: $schema version doit égaler la version CLI — et rtk peut lire un check rouge comme EXIT=0", + "similarity": 0.2 + } + ] +} From 1be45957a322056af48cb03ecc3abad08291534d Mon Sep 17 00:00:00 2001 From: log0u7 <70974447+log0u7@users.noreply.github.com> Date: Mon, 30 Nov 2026 16:03:57 +0100 Subject: [PATCH 3/5] fix: the test saves carry expires_at: null (the EntryInput requires it; the node:sqlite strict bind caught the missing ?? null) --- tests/lib.store.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/lib.store.test.ts b/tests/lib.store.test.ts index 607bb72..07e276a 100644 --- a/tests/lib.store.test.ts +++ b/tests/lib.store.test.ts @@ -824,6 +824,7 @@ describe("the fuzzy lesson recurrence (0.26.3, the paraphrase merge)", () => { title, body: "body", tags: [], + expires_at: null, ...(paths !== undefined ? { paths } : {}), }); return res; @@ -889,6 +890,7 @@ describe("the fuzzy lesson recurrence (0.26.3, the paraphrase merge)", () => { title: "git tag hangs on the editor (vim)", body: "body", tags: [], + expires_at: null, distinct: true, }); expect(distinct.merged).toBeUndefined(); @@ -904,6 +906,7 @@ describe("the fuzzy lesson recurrence (0.26.3, the paraphrase merge)", () => { title: "git tag -m hangs waiting for the editor", body: "body", tags: [], + expires_at: null, }); const again = saveEntry(db, { scope: "/home/logout", @@ -911,6 +914,7 @@ describe("the fuzzy lesson recurrence (0.26.3, the paraphrase merge)", () => { title: "git tag hangs on the editor (vim)", body: "body", tags: [], + expires_at: null, }); expect(again.merged).toBeUndefined(); expect(again.created).toBe(true); @@ -946,6 +950,7 @@ describe("the lesson-pairs calibration fixture (0.26.3)", () => { title: pair.a, body: "x", tags: [], + expires_at: null, ...(pair.paths !== undefined ? { paths: pair.paths } : {}), }); const res = saveEntry(db, { @@ -954,6 +959,7 @@ describe("the lesson-pairs calibration fixture (0.26.3)", () => { title: pair.b, body: "x", tags: [], + expires_at: null, ...(pair.paths !== undefined ? { paths: pair.paths } : {}), }); expect(res.merged, `SAME pair should merge: ${pair.a} ~ ${pair.b}`).toBeDefined(); @@ -969,6 +975,7 @@ describe("the lesson-pairs calibration fixture (0.26.3)", () => { title: pair.a, body: "x", tags: [], + expires_at: null, ...(pair.paths !== undefined ? { paths: pair.paths } : {}), }); const res = saveEntry(db, { @@ -977,6 +984,7 @@ describe("the lesson-pairs calibration fixture (0.26.3)", () => { title: pair.b, body: "x", tags: [], + expires_at: null, ...(pair.paths !== undefined ? { paths: pair.paths } : {}), }); expect(res.merged, `NEAR-MISS must NOT merge: ${pair.a} ~ ${pair.b}`).toBeUndefined(); From f8ee77a5ad863a8b658fbc80c15342c86035a8ba Mon Sep 17 00:00:00 2001 From: log0u7 <70974447+log0u7@users.noreply.github.com> Date: Mon, 30 Nov 2026 16:07:15 +0100 Subject: [PATCH 4/5] fix: the smoke-dist static-import regex stays single-line (an import spec is never multi-line; the STOPWORDS data string "from" triggered a multi-line false match) --- scripts/smoke-dist.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/smoke-dist.mjs b/scripts/smoke-dist.mjs index a0037d0..75ba28c 100644 --- a/scripts/smoke-dist.mjs +++ b/scripts/smoke-dist.mjs @@ -32,7 +32,7 @@ function fail(message) { // tsc emits ESM with double quotes; `import("x")` is dynamic, `from "x"` and // `import "x"` are static. -const STATIC_SPEC = /(?:\bfrom\s*|\bimport\s*)(["'])((?:[^"'\\])+)\1/g; +const STATIC_SPEC = /(?:\bfrom\s*|\bimport\s*)(["'])((?:[^"'\\\n])+)\1/g; const DYNAMIC_SPEC = /\bimport\s*\(\s*(["'])((?:[^"'\\])+)\1\s*\)/g; // Hosts provide their own plugin API module; it must never be shipped or From 743502377246f2cba0f8b5f566d1e2ed38f2542f Mon Sep 17 00:00:00 2001 From: log0u7 <70974447+log0u7@users.noreply.github.com> Date: Mon, 30 Nov 2026 16:38:03 +0100 Subject: [PATCH 5/5] chore(release): the package.json = 0.26.3 (the bump rode the closed PR #113, the merge #114 shipped without it) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e98f362..e43b045 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@log0u7/opencode-memory", - "version": "0.26.2", + "version": "0.26.3", "description": "Working memory for OpenCode: shared SQLite store with hybrid search, shared across all sessions on a machine.", "type": "module", "license": "Apache-2.0",