Commit Graph

280 Commits

Author SHA1 Message Date
can1357 8baa3300bc chore: bump version to 17.2.3 2026-08-01 08:35:39 +02:00
roboomp c95d182bf2 fix(mnemopi): anchored think stripping to leading blocks
- Restricted the reasoning-wrapper removal to leading <think> blocks so a
  literal think tag after real content is preserved instead of deleted.
- Added coverage asserting mid-content think tags survive cleanOutput.

Fixes #7231
2026-08-01 05:18:25 +00:00
roboomp ebd7ea3578 fix(mnemopi): stripped reasoning blocks from remote llm output
- Removed MiniMax-style think wrappers in cleanOutput so reasoning-model
  responses no longer leak into consolidation summaries or corrupt fact
  extraction (the wrapper previously survived parsing and every stored fact
  became reasoning prose).
- Added remote consolidation and remote extraction regression coverage.

Fixes #7231
2026-08-01 05:13:19 +00:00
can1357 d5861c2c66 chore: bump version to 17.2.2 2026-07-31 20:56:49 +02:00
can1357 2c85a74cd4 chore: rewrite changelog 2026-07-31 20:40:52 +02:00
can1357 e9dda1f867 chore: applied biome formatting to merged pull request sources 2026-07-31 19:32:42 +02:00
can1357 8cd634350f test(mnemopi): make statement lifetime checks portable 2026-07-31 19:28:41 +02:00
can1357 da0f16966d Merge PR #7084: fix(mnemopi): release one-shot prepared statements (@Cyrus580529) 2026-07-31 19:28:41 +02:00
can1357 df9d9c8899 chore: bump version to 17.2.1 2026-07-30 17:27:05 +02:00
Cyrus 63ca18bd53 test(mnemopi): release prepared statements in file-backed suites
Six suites build a real DB under a temp dir and then `rmSync` it in
`afterEach`. Each leaked its own one-shot statement the same way the source
did, so the teardown hit EBUSY on Windows and failed tests whose assertions
had already passed.

Only the suites that touch a file-backed DB are changed. The remaining
`prepare()` calls in the package tests run against `:memory:`, where there
is nothing to unlink and no cleanup to fail.
2026-07-30 19:53:57 +08:00
Cyrus 0c9cc54561 fix(mnemopi): release one-shot prepared statements
Every `db.prepare(...)` in the package was a one-shot: prepared, stepped
once via run/get/all, then dropped without `finalize()`. There were 65 such
sites and no `finalize()` call anywhere. An unfinalized statement keeps the
SQLite connection alive, so `BeamMemory.close()` -> `closeQuietly(db)` ->
`db.close()` never released the file. `closeQuietly` swallows the error;
calling `db.close(true)` instead surfaces "database is locked".

One-shot writes now go through `db.run(sql, params)`, which prepares and
finalizes internally. Statements that are read from, or reused across a
loop, are bound with `using` so they are finalized when they leave scope.

On Windows the effect is user-visible beyond tests: the memory DB and its
`-wal`/`-shm` sidecars stay locked after mnemopi closes them, so the file
cannot be deleted, moved, or rotated. On POSIX the leak is silent because
open files can be unlinked.

The new suite pins both halves: that `db.close(true)` does not throw after
the store paths run, and that a closed bank leaves no `-wal`/`-shm` behind
and can be deleted. All three cases fail on the unfixed sources.

Same class as 14252e71c and #6762, neither of which covered this package.
2026-07-30 19:53:57 +08:00
can1357 3d6b5b7ac8 chore: bump version to 17.2.0 2026-07-30 07:58:50 +02:00
can1357 f446b8a819 chore: bump version to 17.1.8 2026-07-28 14:10:19 +02:00
can1357 cce29cbdb0 chore: bump version to 17.1.7 2026-07-28 00:30:15 +02:00
can1357 01d8347b81 chore: bump version to 17.1.6 2026-07-27 17:07:05 +02:00
can1357 7d3f9d382c chore: bump version to 17.1.5 2026-07-27 05:30:59 +02:00
can1357 6d2a8de1bb chore: bump version to 17.1.4 2026-07-26 17:01:19 +02:00
can1357 0491f2961a chore: bump version to 17.1.3 2026-07-25 01:10:32 +02:00
can1357 7ebf141743 chore: bump version to 17.1.2
- fixed rustfmt drift and clippy errors in pi-shell moreutils builtins (combine, errno, ifne, isutf8, sponge, ts) that blocked the release check gate
2026-07-24 16:53:52 +02:00
can1357 c36826cbac chore: bump version to 17.1.1 2026-07-24 09:18:41 +02:00
can1357 5e63cc5696 chore: bump version to 17.1.0 2026-07-24 02:49:18 +02:00
can1357 639bac596d chore: bump version to 17.0.9 2026-07-23 14:40:52 +02:00
can1357 9b54d9e9ac chore: bump version to 17.0.8 2026-07-23 00:41:54 +02:00
can1357 7d404686c2 chore: updated changelogs + remove summarization marker 2026-07-22 23:59:32 +02:00
can1357 0002905ec5 chore: untrack node_modules symlinks and harden ignore pattern
- An eval-worktree cherry-pick swept 16 packages/*/node_modules symlinks into the index; 'node_modules/' with a trailing slash only matches directories, so symlinked installs bypassed the ignore. Dropped the slash and removed the tracked links.
2026-07-22 21:43:22 +02:00
can1357 eadfc9a4ec Merge PR #6280: perf(mnemopi): run recall vector kernels natively (@wolfiesch) 2026-07-22 21:13:24 +02:00
can1357 b9072f1991 fix(extensibility): validate Type.Unsafe against the draft-2020-12 upgraded schema
Aligns the shim's runtime safeParse/__validator with the wire/tool-call
path, so legacy draft-07 documents (tuple items) accept the same values
validateToolArguments does. Adds a regression test.
2026-07-22 21:13:21 +02:00
Wolfgang Schoenberger 72394db605 test(mnemopi): refresh bench artifact on an idle host and sync changelog claims 2026-07-22 05:30:52 -07:00
Wolfgang Schoenberger 8047bedaa4 test(mnemopi): record bench host metadata and allow archive-deployed sha 2026-07-22 05:11:36 -07:00
Wolfgang Schoenberger 4ffe1822d4 refactor(mnemopi): keep only production-backed native kernels after wrapper-level benchmarking 2026-07-22 04:45:13 -07:00
Wolfgang Schoenberger 3c84e2c410 fix(mnemopi): clamp native limits, preserve JS lowercase semantics, wrapper-level bench 2026-07-22 04:10:17 -07:00
Wolfgang Schoenberger 6b9726552b chore(mnemopi): add changelog attribution links 2026-07-22 03:21:13 -07:00
Wolfgang Schoenberger 29338e1508 test(mnemopi): refresh bench artifact at final kernel revision 2026-07-22 02:44:31 -07:00
Wolfgang Schoenberger 4de678f44d chore(mnemopi): add changelog entries for native vector kernels 2026-07-22 02:32:35 -07:00
Wolfgang Schoenberger c11083c15b test(mnemopi): refresh native vector bench artifact 2026-07-22 02:30:25 -07:00
Wolfgang Schoenberger 46e296637f refactor(mnemopi): use Bun.spawnSync for bench sha capture 2026-07-22 02:29:55 -07:00
Wolfgang Schoenberger 86ef6636c8 test(mnemopi): benchmark every swapped native vector kernel with adaptive iterations 2026-07-22 02:28:30 -07:00
Wolfgang Schoenberger 85fae69281 style(mnemopi): format native vector parity test 2026-07-22 01:58:23 -07:00
Wolfgang Schoenberger 7542b31ee8 perf(mnemopi): add crossing-inclusive native vector kernel benchmark
dim=384 (fastembed bge-small), stride=48B binarized, counts 10/100/1k/10k,
20 warmup + 200 timed iterations per cell, run at 22a5fb3d9. Native wins at
every measured size: cosine batch 1.4-2.9x, vectorIndexTopK 1.6-2x, Hamming
batch 4.5-10x; no break-even crossover above count=10.
2026-07-22 01:25:08 -07:00
Wolfgang Schoenberger 22a5fb3d9f perf(mnemopi): use native batch vector kernels in recall hot loops
Swap the batch-shaped scoring loops to the pi-natives kernels behind the
existing TS function signatures, so every caller keeps its guards and
observable behavior: mmrRerank (default Jaccard path), searchExactVectorIndex,
clusterBySimilarity, BinaryVectorStore.search, and FastBinarySearch.search.
cosine_similarity_pairs now takes Float64Array so f64 vectors round-trip
without f32 narrowing. Scalar one-off call sites stay in TS (query-cache
cosine probe, shmr centroid/confidence loops, recall per-row cosine map,
custom-similarity mmrRerank). Adds a seeded parity suite: 1e-9 relative
tolerance for floats, exact equality for Hamming distances and pair lists,
identical MMR index sequences across lambda/topK grids.
2026-07-22 01:24:37 -07:00
can1357 7b141199d5 chore: bump version to 17.0.7 2026-07-21 22:11:51 +02:00
can1357 aa1b89db49 chore: bump version to 17.0.6 2026-07-20 23:46:18 +02:00
can1357 9fd6e97113 chore: bump version to 17.0.5 2026-07-18 23:51:40 +02:00
can1357 0ca454befa chore: bump version to 17.0.4 2026-07-18 06:41:08 +02:00
DarkPhilosophy 7ca0235616 fix(mnemopi): normalize the default model cache root 2026-07-18 02:55:00 +03:00
DarkPhilosophy e6d3064bef fix(mnemopi): compose cache heals and route the embed worker through them
Review follow-ups:
- The corruption retry now goes THROUGH the sidecar heal, so a cache
  broken in both ways (truncated model blob AND stale/missing
  config/tokenizer sidecars) recovers in one pass instead of the retry
  escaping with a sidecar error.
- defaultLocalModelInitializer is exported from core as the shared
  initializer and the coding-agent embed worker now uses it instead of
  calling FlagEmbedding.init directly, so omp's subprocess embeddings
  inherit both heals; fastembed/onnxruntime still load only in the
  child address space.
2026-07-18 02:35:39 +03:00
DarkPhilosophy eed5da008e test(mnemopi): pin the corruption retry contract end-to-end
defaultLocalModelInitializer (exported @internal for tests; production
seam stays setLocalModelInitializer) now provably retries
FlagEmbedding.init EXACTLY once after a Protobuf-corruption failure,
quarantining the cached file in between, and surfaces the error without
looping when the retry fails too. The heal callsite now passes
options.cacheDir so containment checks the caller's cache root, not
only the global default.
2026-07-18 02:25:05 +03:00
DarkPhilosophy 61cdedec02 docs(mnemopi): changelog entry for corrupt-model self-heal 2026-07-18 02:22:12 +03:00
DarkPhilosophy 6cc0c71d1d fix(mnemopi): self-heal a corrupt cached embedding model on init
A truncated model_optimized.onnx (observed live: 5.7MB file from June,
'Protobuf parsing failed' on every load) blocks local embeddings
forever: the downloader treats the existing file as complete, so every
init re-parses the same broken bytes and local recall/retain loses its
embedder. defaultLocalModelInitializer now quarantines the exact file
named by the loader (atomic rename to *.corrupt-<ts>) and retries init
ONCE so the model re-downloads.

The extracted path is error-message content: it is honored only when
it resolves inside the fastembed cache directory, so a dependency
emitting an unexpected message can never rename an arbitrary file.

Contract tests: protobuf failure quarantines exactly the named cache
file and reports retry-safe; unrelated errors touch nothing; a missing
file (concurrent heal) stays retry-safe; a path outside the cache root
is refused untouched.
2026-07-18 02:21:17 +03:00
can1357 2c225a0d00 chore: bump version to 17.0.3 2026-07-17 21:38:00 +02:00