vCard deletion detection and vanished-collection handling #14
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:fire
svd:go
svd:hold
svd:respec
svd:skip
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/people-mind-mcp#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #1. Records: ADR 0004 §6 (a disappeared contact tombstones its source link; the Person stays).
What to build
source_linksrow (deleted_at), as the CardDAV Source does forsync-tokendeletions.addressbooksfilter, does not tombstone its members on one pass. Decide and implement the rule: a collection absent for N consecutive passes, or an explicit operator action, retires its links.Acceptance criteria
sync --oncetombstones exactly that link; the Person and its asserted rows stay.deleted=0.Blocked by
Filed from the architect gate on the #5 spec, 2026-11-01 (Open Risk 5), operator word "accept".
⏸ SVD architect gate: dev/peoplemind-mcp#14 vcard-deletion-detection-and-vanished-collection-handling
Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity
standard· dispatch effortmediumRun:
20261101T081350Z-c70f2c3bHeld because: CLEAN but 6 open risk(s) (2 verification · 4 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
dffd39dand record the failure set. After the change, the same command must show the same failure set (expected none), with T8 the only permitted existing-test edit. 'uv run ruff check src tests' and 'uv run mypy' must both be clean. [verification]Change: vCard part: in sync.run_pass, add an
elif source.kind == "vcard" and not source.unreadablebranch next to the StatefulSource tombstone loop at sync.py:44-47, using the same loop shape. It reads live links with a new LIVE_LINKS query (SELECT source_record FROM source_links WHERE source = ? AND deleted_at IS NULL) and tombstones every live link whose record the pass did not yield.seenis every yielded record, skipped outcomes included. Detection sits in run_pass and the DB rather than in new source state, so unchanged passes still write nothing (test_fifty_card_import_is_idempotent). The vCard summary line gainsdeleted=D(sync.py:70-74). Revival already works: the upsert clears deleted_at (graph.py:53-57, 255, 320-325). CardDAV part: add a RETIRE_AFTER_PASSES = 3 constant to carddav.py. In fetch, right afterdiscovered = self._discover()(carddav.py:245) and after old_groups (:242), keep a separate top-levelstate["absent"]url→count map. A discovered url pops its count. An undiscovered url increments; at N it pops the collection and adds its members' records toremoved. The existing remaining/groups/affected tail (:262-287) then handles UIDs still listed in a live collection, group-tag refresh, and a full-listing return. A failed discovery raises before the counters change, and run_pass persists state only on success (sync.py:47, 52-69).Files:
src/peoplemind_mcp/sync.py·src/peoplemind_mcp/sources/carddav.py·tests/test_vcard_sync.py·tests/test_carddav.pyDecision: accept the 6 open risk(s) above and dispatch this spec (
svd:go), or park (svd:skip) / re-spec (svd:respec)?Your call (when this issue is held at the gate via
svd:hold):svd:go— approve; Half-B dispatch accepts exactly this spec (open risks accepted)svd:firebesidesvd:go— approve AND authorise the Half-B fire from the phone; never on its ownsvd:skip— park it; dispatch refuses it and the issue stays for a humansvd:respec— discard this spec; the next Half-A run re-produces it with this record as prior-attempt contextSpec:
/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-01-vcard-deletion-detection-and-vanished-collection-handling.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-01-vcard-deletion-detection-and-vanished-collection-handling.mdArchitect gate: CLEAN, rulings recorded, released for dispatch
Spec
2026-11-01-vcard-deletion-detection-and-vanished-collection-handling.md(Half-A run20261101T081350Z-c70f2c3b, batchfaebc8b77de84e938c3fd543da6ddf33with #8). The rulings are appended to the spec under## Agent Adjustments.unreadable > 0, and add an empty-import guard. A vCard import that yields zero records while live links exist tombstones nothing and printsdeleted=0. This is the vCard analogue of the N-pass rule: an unmounted directory must not tombstone every link on one pass. One new test covers it.-m radicaleagainstscripts/radicale.shas for #5.deleted=Dat the end of the vCard line only. The Radicale tests outside the write set substring-match the existing tokens.Riders: pytest only as
uv run python3 -m pytest … --basetemp "$(mktemp -d "${TMPDIR:-/var/tmp}/svd.XXXXXX")/x"(the spec's barepython3 -m pytestspellings mean this form); no nested.git;pyproject.tomlstays untouched; the sibling unit's files (#8:config.py,store.py,rows.py,feed.py,server.py,conftest.py,test_server.py,README.md) stay untouched.Write set: 4 files. Disjoint from #8.
Operator: paste
svd:goto release Half-B. Dispatch runs ascodex-svd dispatch-batchwithCODEX_SVD_STAGE_TIMEOUT_SECONDS=9000.spec-verify-dispatch Half B for dev/peoplemind-mcp#14 vcard-deletion-detection-and-vanished-collection-handling completed integration verify.
7c3a1670487c3a167(absent, non-blocking). Local: 162 passed, 3 skipped; ruff, format and mypy clean.7c3a167.7c3a167(statuses API returned []); no CI run in history for this commit. No tracking pointer found. — reported as absent, not blocking (gh#633)codex-svd ship --run-id 20261101T084721Z-07336e07 --confirm-merge)