CardDAV multiget sends absolute hrefs; iCloud answers 400 #34
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#34
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?
Problem
Against live iCloud (
contacts.icloud.com, 1,351 cards) the first CardDAV pass fails withcode=carddav-protocol. Discovery and thesync-collectionREPORT succeed (207). The firstaddressbook-multigetREPORT returns400with an 11-byte body._listingresolves every memberhrefwithurljoin(str(response.url), …), so the hrefs it returns are absolute URLs (https://p140-contacts.icloud.com/<dsid>/carddavhome/card/<uid>.vcf)._multigetwrites those absolute URLs into the<D:href>elements of the multiget body. iCloud rejects that; it accepts path-only hrefs.Measured from the sync container on 2026-11-02 (statuses only, no card data):
Radicale accepts both forms, which is why
tests/test_carddav_radicale.pypasses. Fastmail was not reachable for comparison in the same run (credential issue, separate).Fix
In
CardDAVSource._multiget, writeurlsplit(href).pathinto each<D:href>while keeping the absolute href as the dictionary key, socards[href]and the caller'schanged/deletedsets are unchanged. Match the server's response hrefs byurljoinas today (the response may come back either way).Keep the chunk size at 100 and the Depth header as is: both passed on iCloud.
Acceptance
<D:href>in a multiget body is a path (no scheme, no host) when the listing hrefs are absolute.tests/test_carddav_radicale.pystill passes.status=okforsource=icloud(recorded on #10, not in CI).Primary files
src/people_mind_mcp/sources/carddav.py(_multiget)tests/test_carddav.pyBlocked by
None.
⏸ SVD architect gate: dev/people-mind-mcp#34 carddav-multiget-sends-absolute-hrefs-icloud-answers-400
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:
20261102T022451Z-f01495d4Held because: CLEAN but 2 open risk(s) (2 verification) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
eval "$(scripts/radicale.sh up)" && uv run python3 -m pytest tests/test_carddav_radicale.py -rs, confirm 3 passed and 0 skipped, and quote the summary line in the PR. [verification]Change: In CardDAVSource._multiget (src/people_mind_mcp/sources/carddav.py:204), write
urlsplit(href).pathinto each <D:href>. This mirrors the existingurlsplit(url).pathidiom at carddav.py:149. urlsplit is already imported at line 8. Leave the chunk size of 100, the Depth "1" header, and the line-207 urljoin response matching unchanged, so the keys stay absolute for both fetch call sites (lines 269 and 283). In tests/test_carddav.py, change the FakeDav multiget branch (lines 134-147) to behave like iCloud: return 400 b"Bad Request" when a body href has a scheme or host; otherwise look the card up with urljoin(url, text); echo the path form back, or the absolute form when the new absolute_multiget_responses flag is set. Add test_multiget_sends_path_hrefs_for_absolute_listing_hrefs, parametrized on that flag and modelled on the recording-transport shape of test_rejected_full_listing_is_not_retried (lines 810-831). It puts 150 cards and asserts chunk sizes [100, 50], that every recorded href has no scheme or host, that fetched == 150, and that member keys stay absolute.Files:
src/people_mind_mcp/sources/carddav.py·tests/test_carddav.pyDecision: accept the 2 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-02-carddav-multiget-sends-absolute-hrefs-icloud-answers-400.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-02-carddav-multiget-sends-absolute-hrefs-icloud-answers-400.mdArchitect gate (Half-A CLEAN)
Spec:
specs/2026-11-02-carddav-multiget-sends-absolute-hrefs-icloud-answers-400.md(exhaust worktree, gate adjustments appended).Lean kept. One-line fix in
_multiget: sendurlsplit(href).pathin each<D:href>;_listingkeeps resolving absolute.FakeDavbecomes iCloud-strict (400 on a scheme or host href) so the existing suite would have caught this. New parametrised testtest_multiget_sends_path_hrefs_for_absolute_listing_hrefs[False|True].Host baselines at
2224edd:tests/test_carddav.py57 passed. Radicale host suite 3 passed. Dispatch records its own pristine-base run.Open risks ruled: live iCloud pass is post-merge, recorded on #10 by the architect. Radicale is run by the architect on the scratch worktree at the PR gate, never claimed by the agent.
Riders: basetemp on every pytest command,
python3 -m pytest, no nested.git, no.agents/.codex/.gitpaths written.Operator: paste
svd:goto release Half-B (batched with #35).spec-verify-dispatch Half B for dev/people-mind-mcp#34 carddav-multiget-sends-absolute-hrefs-icloud-answers-400 completed integration verify.
e21251ca17e21251c: no remote CI statuses (absent). Local: ruff check, ruff format --check and mypy clean; tests/test_carddav.py 59 passed. Both new multiget tests collect.e21251c(Forgejo statuses API returned []); repo has no CI directory per spec. No tracking pointer found. — reported as absent, not blocking (gh#633)codex-svd ship --run-id 20261102T032335Z-af825f52 --confirm-merge)