Fence Projects pushes and report partial writes

UN
11m ago
+2971-430

Fixes #303

On 4fb4854, two push plans built before either saw a card created two drafts for the same non-git tracker item. A separate fixture returned a draft card ID and then rejected Status. The command exited with “Sync wrote nothing; 1 operation(s) failed.”

Projects push now rebuilds its binding under the tracker ownership lease using the complete live board and tracker. Missing-card tags and competing claims block replacement. When another push already attached the card, a stale plan reuses it. Draft creation records a durable attempt before dispatch and retains a confirmed ID until the guarded native tracker tag is present. Status is applied after the tag, and retries continue on the same card. Ambiguous draft delivery requires reconciliation before another creation attempt. GitHub documents that attaching an already-present issue or pull request returns its existing card ID. GitHub Projects API documentation

JSON and TOON expose per-item attachment, status, and trackerTag outcomes, the confirmed card ID, and pushPartial. A Status refusal after attachment is visible as a partial success with a retained tracker tag. The README describes these fields and the recovery steps.

The related Node suite covered 68 files. It passed 1,975 cases on its first run, and the two updated fixtures passed on a targeted rerun, for 1,977 distinct passing cases. Seven isolated behavioral reverts broke stale-plan fencing, absent-card protection, peer-claim protection, Status failure retention, confirmed-card recovery, ambiguous-delivery handling, and the packed receipt. The packed smoke used both npx --no-install pm and bunx --bun --no-install pm in both formats. The three PM-linked commands passed 129 Node, 40 native Bun, and 175 planner and ownership cases. Typecheck, builds, lint, docstrings, duplication, the ownership inventory, and the changelog check passed. The identity and privacy gate audited 4,795 objects in a fresh clone of the delivery commit.

PM tracker item

Two stale REST export plans for an unlinked item also emitted two issue creation requests against a synthetic transport. That separate component is tracked in #304.


Summary by cubic

Fixes the race where two early-built Projects push plans created duplicate drafts for the same non-git item, and reworks receipts so a Status write refusal after attachment reports a partial success instead of "Sync wrote nothing."

  • Push revalidates against the live board under the ownership lease and records the verification cutoff; a stale plan reuses an already-attached card (link-card), and a tracker tag pointing at an unconfirmed card is blocked.
  • Draft creation journals the attempt before dispatch and keeps the confirmed card ID until the tracker tag is live; Status writes recheck tag and ownership, and fresh Status is arbitrated while preserving planned issue ownership.
  • Drafts settle after the Status write, and GraphQL refusals are classified in the receipt.
  • JSON and TOON receipts expose per-item attachment, status, and trackerTag outcomes plus pushPartial; the README documents recovery steps.
  • Bound Status writes are refreshed after tag repair without losing existing push receipts.
  • The release gate fixture now uses fewer child processes.

Closes #303. The separate REST export path shows the same duplicate-create class and is tracked in #304.