Rust CLI for tangled forked from dunkirk.sh/tangled-cli

Fix repository creation indexing order #34

Merged dzejkop.space
targeting main from deleted fork:codex/create-repo-before-pds-record
Merged opened by and assigned to dzejkop.space
targeting main from deleted fork:codex/create-repo-before-pds-record

Repository creation currently writes an incomplete sh.tangled.repo record before the knot returns repoDid. The Tangled appview ignores that create, and the later update is skipped because no database row exists, leaving successfully pushed repositories invisible on tangled.org.

Create the knot repository first, then publish one complete PDS record containing repoDid. If the PDS write fails and no record exists, roll back the knot repository to avoid leaving an orphan. The existing verification for PDS errors returned after a committed write remains in place.

Regression coverage verifies the initial record contains repoDid and that a failed PDS write deletes the newly created knot repository.

Validated with:

  • cargo fmt --all -- --check
  • cargo check --workspace --all-targets --locked
  • cargo test --workspace --locked
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo xtask codegen --check
Commits 0