Skip to content

v1.0.0 — Task/Loop subsystem feature-complete (M1-M5)

Choose a tag to compare

@chinesewebman chinesewebman released this 06 Aug 14:15
· 403 commits to main since this release

v1.0.0 — Task/Loop subsystem feature-complete (M1-M5)

DESIGN §12 milestones M1-M5 all shipped. Task and Loop entities gain a full state-machine
core with audit log, concurrent safety, crontab-style recurring tasks, and stuck-task
proposals.

Highlights

  • State machine: transition / list / replay with 6 task states + 3 loop states
    • bi-temporal valid_from/valid_until windows
  • Concurrent safety: BEGIN IMMEDIATE cross-connection for apply_stale_proposal,
    forget_task, forget_loop — eliminates check-then-update races
  • loop_tick_cron: recurring tasks with configurable intervals
  • propose_stale_tasks: open>7d / waiting>14d / blocked>3d / in_progress>3d
    thresholds → audit_log proposals → apply/resolution loop
  • Forgetting with reason: explicit corrective gate (D8) — min length + strip +
    str type guards
  • usearch f16 runtime contract: double assertion (init + load) prevents the
    mixed-precision file corruption class entirely

MCP tools (22 total)

Group Tools
Memory core remember / recall / lanes / compact / digest / start
Task/Loop list_tasks / get_task_state / propose_stale_tasks /
list_stale_proposals / apply_resolution / forget_task /
forget_loop / start_loop / list_loops / loop_state / forget

Plus 8 other tools across lanes, audit, vector maintenance.

API boundary guards

Every public function enforces isinstance + range + whitelist for each
parameter. M33-M36 series:

Pass Concern
M30 race fix + threshold validation + digest ≤2000 chars
M33 forget race fix + reason ≥5 chars
M34 status/limit whitelist on list_stale_proposals
M35 reason isinstance(str) on forget path
M36 transition() reason/task_id/to_state/evidence guards

Search backend

Backend Status
usearch HNSW (f16) default; load+init runtime f16 assertion
zvec HNSW + INT8 + FTS5 optional; auto-preferred over usearch

Operational changes

  • WAL checkpoint warning persists (MCP long connections block truncate);
    manual wal_checkpoint(TRUNCATE) recommended when MCP is down
  • usearch.index rebuild path: scripts/rebuild_index.py --backend usearch --fresh (data-loss-safe; rebuilds from SQLite chunks only)
  • RUNBOOK § usearch-f16 + index-corruption diagnosis added

Stats

Metric Value
Commits since v0.5.12.1 162 (51 feat / 39 fix / 62 docs)
Tests passing 103 (full suite, isolated DB)
Review-pass audits 5 (M28-M37), all findings closed
Tags v1.0.0 (this)
Latest commit 6e06dbf

Upgrade notes

  • transition() reason is now always required (was force-only);
    callers must supply a non-empty string ≥1 char (post-strip)
  • list_stale_proposals accepts {proposed, applied, reverted, all}
    for status; limit clamped to 1-1000
  • forget_task / forget_loop reason is now validated (isinstance str,
    strip, min length 5)
  • transition() race fix: callers no longer need explicit
    BEGIN/COMMIT wrapping for atomicity on the simple API path; the
    function still accepts a caller-provided connection for full
    transaction control

Docs: DESIGN_TASK_LOOP.md ·
RUNBOOK.md ·
REVIEW_LOG.md