ver 1.5.0 — six-improvement pass: retention, routing, self-firing memory
1. capture-update keeps the whole body (was truncating to first line) 2. frontmatter completeness: kind-default status + kind-seeded tags at capture, fm create-or-replace, incomplete-frontmatter lint, sweep backfill (one data source: KIND_STATUS/KIND_REQUIRED_FM) 3. pre-write duplicate gate (exit 76, --merge-into/--force) 4. recall corpus + ranking: sessions/journal indexed (down-weighted), BM25 x freshness x status fusion, recall --json, index schema 2 5. session hooks: SessionStart auto-load, Stop reflection nudge 6. one-tap triage verb with processing-log audit; --json on read verbs +22 mock end-to-end tests; all suites green. Docs current (README, CHANGELOG, SKILL.md, commands, references, MAINTENANCE, eval README). Drops tracked .DS_Store (gitignored); retires README-gretchen.md (moved to gitignored dist/); adds the field report that drove item 2. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -107,9 +107,22 @@ def main():
|
||||
g = ground(doc) or ""
|
||||
check("frontmatter replace updates existing field", "updated: 2026-06-22" in g, g)
|
||||
|
||||
# frontmatter replace on a MISSING field -> 400 (matches real API).
|
||||
# fm on a MISSING field: the server still 400s the raw PATCH (matches real API),
|
||||
# but cmd_fm (v1.5) falls back to a surgical create — the key is inserted and
|
||||
# every other line is preserved. (The old contract failed loud on exactly the
|
||||
# notes that needed repair.)
|
||||
before = ground(doc) or ""
|
||||
r = echo("fm", doc, "nonexistent_field", "x")
|
||||
check("frontmatter replace of a missing field fails loud", r.returncode != 0, r.stderr)
|
||||
check("fm creates a missing field (create-or-replace)", r.returncode == 0,
|
||||
r.stderr or r.stdout)
|
||||
g = ground(doc) or ""
|
||||
check("fm-created key holds the value", "nonexistent_field: x" in g, g)
|
||||
check("fm create preserves every existing line",
|
||||
all(line in g for line in before.splitlines() if line.strip()), g)
|
||||
|
||||
# raw `patch replace frontmatter` (no fallback) still fails loud on a missing key.
|
||||
r = echo("patch", doc, "replace", "frontmatter", "still_missing", tmp('"x"'))
|
||||
check("raw frontmatter PATCH of a missing field fails loud", r.returncode != 0, r.stderr)
|
||||
|
||||
print(f"\n{len(failures)} failure(s)" if failures else "\nall PATCH-semantics tests passed")
|
||||
return 1 if failures else 0
|
||||
|
||||
Reference in New Issue
Block a user