Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# Changelog

## 6.2.9 — 2026-07-10

Independent re-audit of the 6.2.8 hardening release: one line-by-line
auditor over the whole file, one differential regression hunter that
first reproduced 6.2.7's defects to validate the 6.2.8 fixes, one
claims-and-channels auditor, plus a full maintainer read of every file.
All of 6.2.8's headline numbers reproduced exactly; the fixes below close
what was still standing. Every fix was proven red with a regression test
before the change:

- **The last stale-decision races are closed.** The merge keeps a
per-node freshness baseline (last_accessed / access_count as of our
last disk read) and re-validates stale decisions against the CURRENT
disk copy inside the lock: a dream computed on a stale view can no
longer prune a memory another process confirmed meanwhile (the
GRACE_DAYS promise now holds under concurrency), a stale decayed
weight no longer min()s down a fresh confirm, and persisting a
duplicate-remember confidence upgrade no longer whole-copies stale
counters over a concurrent confirm — confidence merges max-wins as its
own field, the same way counters merge as deltas (6.2.8's way of
persisting it had traded one loss for another). Prune events are
journaled AFTER the save, and only for prunes that actually landed;
vetoed prunes are reported.
- **The contradiction scan flags without clobbering.** An existing user
link between a conflicting pair keeps its relation and earned weight;
the conflict edge is only created where no user edge exists — "never
silently destroys data" covers edge metadata too.
- **`recall --at` normalizes compact and tz-aware forms.** On 3.11+,
`--at 20260101` parsed but compared lexicographically against dashed
stamps ('-' < '0'), so every same-year fact looked valid at that past
date; all accepted forms now normalize to the naive dashed ISO the
graph stores before any comparison (older interpreters keep rejecting
compact forms as a usage error).
- **A hand-deleted END guard no longer costs user content.** Export used
to rewrite the file and silently drop everything after BEGIN; the
damaged file is now left untouched and reported as skipped with the
reason.
- **The duplicate-remember boost is one number.** The reopen path
persisted +0.2 while the plain path's delta replay persisted +0.15;
both are BOOST_PER_ACCESS now.
- Known merge tradeoff, now stated: a long-lived stale process can
re-add a node another process pruned meanwhile (additive union favors
never losing writes; the next dream re-prunes it).
- 220 tests. Mutation kill rate: 42% on the seeded 120-mutant sample.


## 6.2.8 — 2026-07-10

Exhaustive line-by-line audit of code, tests, benchmarks, documentation,
Expand Down
8 changes: 4 additions & 4 deletions README.ar.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
كودكس، كرسور، زد)، و`CLAUDE.md` (كلاود كود)، و`GEMINI.md` (جيمناي) — وتُتبنّى تلقائيًّا في `.cursorrules` و`.windsurfrules` و`.clinerules` و`.roo/rules/mind.md` للمشاريع التي تستخدم تلك الأدوات أصلًا.

```bash
curl -fsSLO https://raw.githubusercontent.com/Da7-Tech/mind/v6.2.8/mind.py
python3 -c "import hashlib;h=hashlib.sha256(open('mind.py','rb').read()).hexdigest();assert h=='b3e944ce9103bd5e353e09a12f434721cb274bc919326361039104889c6c5e03',h;print('mind.py: OK')"
curl -fsSLO https://raw.githubusercontent.com/Da7-Tech/mind/v6.2.9/mind.py
python3 -c "import hashlib;h=hashlib.sha256(open('mind.py','rb').read()).hexdigest();assert h=='6dda66fcdb4352fb215f0f285d356e4a110617ff7714f3bdd1d96ab85f766663',h;print('mind.py: OK')"
python3 mind.py init
python3 mind.py remember "قاعدة بيانات المشروع بوستغرس ١٦"
python3 mind.py recall "ما قاعدة البيانات"
Expand Down Expand Up @@ -52,7 +52,7 @@ python3 mind.py dream # بين الجلسات: نسيان وتوطيد و

**التمييز بالقياس** (`bench/discrim.py`، يعمل في CI): تدقيقان مستقلان أصابا حين قالا إن استرجاع الإبرة من ضجيج نظيف لا يقيس التفريق بين حقائق تتشارك المفردات — فهذا المقياس مشتِّتاته كلها متنافسة معجميًّا، وفيه حالات فشل التدقيقَين حرفيًّا («ما اسمي» ضد «اسم الملف يجب أن يطابق اسم الصنف» بالعربية والإنجليزية). النتيجة الحالية: **١٢/١٢** ببوابة ≥٠٫٨٥ في CI كي لا يتراجع التمييز صامتًا مجددًا.

الاختبارات: **٢١٣ اختبارًا** بمكتبة بايثون القياسية وحدها + مشوّش (٤٢٠ حالة كاملة/١٦٠ في CI) + مطفّر بنسبة قتل **٣٩٪** على العينة المبذورة ذات ١٢٠ طفرة.
الاختبارات: **٢٢٠ اختبارًا** بمكتبة بايثون القياسية وحدها + مشوّش (٤٢٠ حالة كاملة/١٦٠ في CI) + مطفّر بنسبة قتل **٤٢٪** على العينة المبذورة ذات ١٢٠ طفرة.

## موضعها بين الأدوات — وظائف مختلفة لا لوحة فائزين

Expand Down Expand Up @@ -153,7 +153,7 @@ python3 mind.py correct "قاعدة ماي إس كيو إل" "قاعدة الب
## التطوير

```bash
python3 -m unittest discover -s tests # ٢١٣ اختبارًا
python3 -m unittest discover -s tests # ٢٢٠ اختبارًا
python3 bench/bench.py # أرقام العربية/الإنجليزية
python3 bench/multilang.py # ٨ لغات غير مضبوطة
python3 bench/discrim.py # التمييز بمشتتات متنافسة
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ adopted automatically by `.cursorrules`, `.windsurfrules`, `.clinerules`
and `.roo/rules/mind.md` in projects that already use those tools.

```bash
curl -fsSLO https://raw.githubusercontent.com/Da7-Tech/mind/v6.2.8/mind.py
python3 -c "import hashlib;h=hashlib.sha256(open('mind.py','rb').read()).hexdigest();assert h=='b3e944ce9103bd5e353e09a12f434721cb274bc919326361039104889c6c5e03',h;print('mind.py: OK')"
curl -fsSLO https://raw.githubusercontent.com/Da7-Tech/mind/v6.2.9/mind.py
python3 -c "import hashlib;h=hashlib.sha256(open('mind.py','rb').read()).hexdigest();assert h=='6dda66fcdb4352fb215f0f285d356e4a110617ff7714f3bdd1d96ab85f766663',h;print('mind.py: OK')"
python3 mind.py init
python3 mind.py remember "the project database is postgres 16"
python3 mind.py recall "which database do we use"
Expand Down Expand Up @@ -105,7 +105,7 @@ rounds had missed (see CHANGELOG 5.5.0).
must catch them. Its first run exposed 17 behaviors the tests didn't
actually pin down — each is now locked by a dedicated regression test
(raw kill rate on the seeded 120-mutant sample: 33% at first run,
**39%**
**42%**
on this release — the sample is re-drawn whenever the file changes, so
the number moves a few points between releases; it is remeasured and
republished each time because hiding it would be the exact sin this
Expand All @@ -115,7 +115,7 @@ local calculations superseded by the locked merge, platform-only branches,
boundary/display constants, and ranking calibration guarded by the CI
benchmark gates rather than exact unit assertions; the tool prints every one.

Test suite: **213 tests**, stdlib `unittest`, `python3 -m unittest discover -s tests` —
Test suite: **220 tests**, stdlib `unittest`, `python3 -m unittest discover -s tests` —
including regression tests for concurrency (parallel writers must not lose
each other's memories), destructive-op gating, corrupt-graph recovery, and
a mutation-kill class where every test pins a behavior the suite
Expand Down Expand Up @@ -341,7 +341,7 @@ optional, since auto-dream already covers it.
## Development

```bash
python3 -m unittest discover -s tests # 213 tests
python3 -m unittest discover -s tests # 220 tests
python3 bench/bench.py # reproduce the EN/AR numbers
python3 bench/multilang.py # 8 untuned languages
python3 bench/soak.py # 180 simulated days
Expand Down
6 changes: 4 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,7 @@ hardening suggestions. You can expect an initial response within a few days.
store secrets, credentials, private personal data, or untrusted prompt text.
- Node ids are `md5[:12]` content addresses — no security property is
derived from them.
- No network access, subprocess execution, or eval — the file can be fully
audited in one sitting (~2,900 lines).
- No network access, no spawned processes, no eval — the file can be
fully audited in one sitting (~3,000 lines). (`subprocess` is imported
on Windows solely for its `list2cmdline` quoting helper; nothing is
ever executed.)
10 changes: 5 additions & 5 deletions SKILL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: mind
description: Project memory graph with recall, provenance, and dreams.
version: 6.2.8
version: 6.2.9
author: Da7 (Da7-Tech)
license: MIT
platforms: [linux, macos, windows]
Expand Down Expand Up @@ -36,7 +36,7 @@ built-in `memory` tool — and it is not a RAG system for large corpora.

- `python3` (3.9+) and `curl` on PATH — nothing else: no API keys, no
server, no packages. The tool is one stdlib-only file, MIT-licensed,
from https://github.com/Da7-Tech/mind (213 tests + benchmarks incl.
from https://github.com/Da7-Tech/mind (220 tests + benchmarks incl.
10 languages + discrimination + fuzzer + 180-day soak test run in its CI
on Linux/macOS/Windows).

Expand All @@ -47,8 +47,8 @@ tag and integrity-checked:

```bash
cd <project>
curl -fsSLO https://raw.githubusercontent.com/Da7-Tech/mind/v6.2.8/mind.py
python3 -c "import hashlib;h=hashlib.sha256(open('mind.py','rb').read()).hexdigest();assert h=='b3e944ce9103bd5e353e09a12f434721cb274bc919326361039104889c6c5e03',h;print('mind.py: OK')"
curl -fsSLO https://raw.githubusercontent.com/Da7-Tech/mind/v6.2.9/mind.py
python3 -c "import hashlib;h=hashlib.sha256(open('mind.py','rb').read()).hexdigest();assert h=='6dda66fcdb4352fb215f0f285d356e4a110617ff7714f3bdd1d96ab85f766663',h;print('mind.py: OK')"
python3 mind.py init
```

Expand Down Expand Up @@ -129,7 +129,7 @@ their rule files synced too (adopted only when present).
## Verification

```bash
cd "$(mktemp -d)" && curl -fsSLO https://raw.githubusercontent.com/Da7-Tech/mind/v6.2.8/mind.py && python3 -c "import hashlib;h=hashlib.sha256(open('mind.py','rb').read()).hexdigest();assert h=='b3e944ce9103bd5e353e09a12f434721cb274bc919326361039104889c6c5e03',h;print('OK')" && python3 mind.py init >/dev/null && python3 mind.py remember "the sky signal is 7413" >/dev/null && python3 mind.py recall "sky signal"
cd "$(mktemp -d)" && curl -fsSLO https://raw.githubusercontent.com/Da7-Tech/mind/v6.2.9/mind.py && python3 -c "import hashlib;h=hashlib.sha256(open('mind.py','rb').read()).hexdigest();assert h=='6dda66fcdb4352fb215f0f285d356e4a110617ff7714f3bdd1d96ab85f766663',h;print('OK')" && python3 mind.py init >/dev/null && python3 mind.py remember "the sky signal is 7413" >/dev/null && python3 mind.py recall "sky signal"
```

Expected: one result containing `7413` with a printed memory id.
Loading
Loading