You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was written agentically; verify its assertions and edit accordingly:
Follow-up from #105 (PR #106). #105 fixed the recovery (the 409/428 retry could not validate a /description op, so the run aborted). This issue is about the cause of the staleness.
The suspicion
sync.main() snapshots each card version (list_cards, or _created_card_snapshot for a card created this run), then:
step 3 sync_child_connections -> POST /card/connections
step 4 sync_dependencies -> POST /card/dependency
step 5 flush -> ONE versioned PATCH /card/{id} per card, using the pre-POST version
In the live 2026-07-29 failure the dependency POST was the only write that touched the card between its snapshot refetch and the flush, and the server reported actualValue: 2 against a sent 1. If those POSTs bump the card resource version, then every run where a card both gains/loses a dependency (or child connection) and carries queued ops eats a failed PATCH + a refetch + a retry, plus a note ... version bumped by an unrelated change line that is not true — the run bumped it itself.
Not yet measured, so this is a hypothesis: an asynchronous server-side bump shortly after card creation would produce the same evidence.
If confirmed, prevent rather than recover, the same reasoning as intake._card_for_link_write: move the step-5 flush ahead of steps 3-4 (nothing in those steps reads what the flush writes; poisoned_card_ids/managed_card_ids are already computable right after step 2), or refetch the version for just the affected cards. Verify the poisoned-card hold and the step-6 comment-sync clean gate are unaffected.
This was written agentically; verify its assertions and edit accordingly:
Follow-up from #105 (PR #106). #105 fixed the recovery (the 409/428 retry could not validate a
/descriptionop, so the run aborted). This issue is about the cause of the staleness.The suspicion
sync.main()snapshots each card version (list_cards, or_created_card_snapshotfor a card created this run), then:sync_child_connections->POST /card/connectionssync_dependencies->POST /card/dependencyPATCH /card/{id}per card, using the pre-POST versionIn the live 2026-07-29 failure the dependency POST was the only write that touched the card between its snapshot refetch and the flush, and the server reported
actualValue: 2against a sent1. If those POSTs bump the card resource version, then every run where a card both gains/loses a dependency (or child connection) and carries queued ops eats a failed PATCH + a refetch + a retry, plus anote ... version bumped by an unrelated changeline that is not true — the run bumped it itself.Not yet measured, so this is a hypothesis: an asynchronous server-side bump shortly after card creation would produce the same evidence.
Work
version,POST /card/dependency, readversionagain; same forPOST /card/connections. Record the result indocs/API-VALIDATION.md(the issue Version-conflict retry can never recover a card carrying a /description op — apply run aborts on HTTP 428 #105 section flags this as UNCONFIRMED).intake._card_for_link_write: move the step-5 flush ahead of steps 3-4 (nothing in those steps reads what the flush writes;poisoned_card_ids/managed_card_idsare already computable right after step 2), or refetch the version for just the affected cards. Verify the poisoned-card hold and the step-6 comment-synccleangate are unaffected.Depends on #107 if the probe should live in
smoke.py.Testing
docs/API-VALIDATION.mdsync.main()test asserting no card is written between its snapshot and its flush PATCH--applyrun shows noversion bumpednote where none is warranted🤖 Co-authored by Claude Opus 5.