docs: the convos miner does check mtime — finish a correction that stopped half-way
ARCHITECTURE.md and README.md still carried the claim from954c3f2(initial commit) that the convos miner "keys on source_file path alone (convos miner doesn't check mtime)", and told the operator to delete the staging dir to force a re-mine.29e660ecorrected exactly that claim in AGENTS.md and SKILL.md — and missed these two files, so the repo has been documenting both behaviours at once ever since. Two files said mtime is checked, two said it is not. Ground truth, read off the deployed mempalace 3.7.1 rather than inferred: convo_miner.py:657 calls file_already_mined(..., check_mtime=True) inside mine_lock(source_file), and palace.py:1430 re-mines when no drawers exist for the source_file, when the stored normalize_version predates the current schema, or when the mtime differs. On a mismatch the file's existing drawers are purged (_source_file_delete_ids -> collection.delete) before refiling, so a changed transcript is replaced rather than doubled. The docstring names the case outright: transcripts are not assumed immutable, since a session keeps appending to its own file while active and /compact or /clear can rewrite one in place. The stale advice was not merely out of date, it was expensive. "Delete the staging dir to force a re-mine" is the one gesture that re-keys dedup: the staged path IS the key, so a stage that is wiped or recreated elsewhere makes the palace refile a whole wing as duplicates instead of replacing it. The docs now say so, name `touch` as the non-destructive way to force a single session, and record why staged copies must carry the source's mtime — with the corollary that an old mtime in a stage or a remote inbox says nothing about when the file was shipped, so a ship is judged by the feeder's log instead. Sample output blocks quoting "(dedup by source_file)" are deliberately left verbatim: that is what bin/mempalace-session:426 and bin/mempalace-pi-session:857 actually print. Tightening the wrappers' own wording is a separate change, because the samples have to move with it.
This commit is contained in:
@@ -64,7 +64,7 @@ Those are pi-generic concerns. This toolkit installs **only** the pi↔mempalace
|
||||
|
||||
- **Standalone executables** in `bin/` with `#!/usr/bin/env bash` shebang, no extension, `chmod +x`. Must work in non-interactive contexts (agent processes, cron, CI).
|
||||
- **Thin wrappers only.** Neither tool reimplements the mempalace miner. Both follow the **stage-to-cache-then-mine** idiom: curate input to `~/.cache/…/<wing>/`, then delegate to `mempalace mine`.
|
||||
- **Idempotent + dry-runnable.** Every tool supports `--dry-run`. Second invocation on unchanged input is a no-op (dedup via `source_file` path, optionally + `mtime`).
|
||||
- **Idempotent + dry-runnable.** Every tool supports `--dry-run`. Second invocation on unchanged input is a no-op (dedup via `source_file` path + `mtime` — all three miner modes pass `check_mtime=True`).
|
||||
- **No external Python deps.** Stdlib only (`sqlite3`, `json`, `pathlib`). Inline in the bash wrapper via heredoc.
|
||||
- Argument parsing: `--help`/`-h` first, then mode flags, then positional args.
|
||||
- Comment sections use `# ── Section Name ──────` style (matches sibling `cli_utils` repo).
|
||||
|
||||
Reference in New Issue
Block a user