Whole file
mcncarl/agent-memory-vault
The author described this change as “fix: exclude archived history from reconcile blocking”. It counts as a record because the check below fails on the code as it stood at ac6d9d62d and passes on 62d14ca2e, with nothing else changed between the two runs.
Projectmcncarl/agent-memory-vault
Fix saved2026-07-11
Sharing licenceMIT · LICENSE
Change size+14 −1
What the code was meant to do, written into the code itself as a save note
fix: exclude archived history from reconcile blocking
The change
| 78 | 78 | r"[\"']?(?!redacted\b|example\b|placeholder\b|your[_-]|<)[A-Za-z0-9_./+=-]{20,}" | |
| 79 | 79 | ), | |
| 80 | 80 | ] | |
| 81 | + | NONCURRENT_RECONCILE_STATUSES = {"archived", "outdated", "superseded", "deleted"} | |
| 81 | 82 | ||
| 82 | 83 | ||
| 83 | 84 | @dataclass | |
| ⋯ | |||
| 435 | 436 | return query[:900] | |
| 436 | 437 | ||
| 437 | 438 | ||
| 439 | + | def is_current_reconcile_target(path: Path) -> bool: | |
| 440 | + | statuses = {value.lower() for value in frontmatter_list(path, "status")} | |
| 441 | + | return not bool(statuses & NONCURRENT_RECONCILE_STATUSES) | |
| 442 | + | ||
| 443 | + | ||
| 438 | 444 | def tokenize(text: str) -> set[str]: | |
| 439 | 445 | tokens: set[str] = set() | |
| 440 | 446 | for word in re.findall(r"[A-Za-z0-9_]{2,}", text.lower()): | |
| ⋯ | |||
| 563 | 569 | def postwrite_reconcile(entries: list[GitEntry], args: argparse.Namespace) -> tuple[list[dict[str, Any]], list[str]]: | |
| 564 | 570 | warnings: list[str] = [] | |
| 565 | 571 | findings: list[dict[str, Any]] = [] | |
| 566 | - | targets = [entry for entry in entries if entry.exists and entry.is_memory_markdown and (entry.is_new or args.reconcile_all)] | |
| 572 | + | targets = [ | |
| 573 | + | entry | |
| 574 | + | for entry in entries | |
| 575 | + | if entry.exists | |
| 576 | + | and entry.is_memory_markdown | |
| 577 | + | and (entry.is_new or args.reconcile_all) | |
| 578 | + | and is_current_reconcile_target(entry.path) | |
| 579 | + | ] | |
| 567 | 580 | for entry in targets: | |
| 568 | 581 | declared_relations = frontmatter_list(entry.path, "related_workflows") | |
| 569 | 582 | query = reconcile_query_for_file(entry.path) | |
The check that tells the two apart
fail→pass·tests/test_closeout_git_history.py::CloseoutReconcileStatusTests::test_archived_history_does_not_block_active_fact_reconcile
Check file tests/test_closeout_git_history.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before itac6d9d62d2ced7e9c680ad7e0b5f63249dd622be
Broken version dated2026-07-11
Modulescripts.agent_memory_closeout
Units changedpostwrite_reconcile
Fingerprint70b6a71a795de2c3
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.