Claude: changes for issue #99 #100
No reviewers
Labels
No labels
breaking-change
bug
documentation
duplicate
enhancement
good first issue
help wanted
performance
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/ATProto.NET!100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/issue-99"
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?
Closes #99.
`SpaceSyncer.SyncRepoAsync` treated a missing commit as "the page stopped short of the head of the oplog, sync again to continue". That is one of two ways to get no commit. The other is an account with no repo state: the host builds the commit from that state, so `listRepoOps` answers `{ops: [], commit: undefined}` for a member who has never written to the space, rather than refusing the read. Such a pass applied nothing, advanced nothing, and reported `Partial` — the outcome documented as "the caller should sync again to continue" — so a caller looping on that contract spun on the repo forever. `Partial` is now reported only when the pass has somewhere left to go: it applied operations, or the host offered a continuation cursor. A page carrying neither is `NoRepo`, the same answer `getRepo` gives by refusing outright. A cursor already standing at a revision takes the existing repair path instead — the host reporting no state for a repo the caller holds a copy of is what full recovery resolves, dropping the stale copy on `RepoNotFound` and rebuilding it otherwise. No signature changed and no enum member was added. closes #99Partialforever for a repo the account never wrote to #99🤖 Reviewing this PR — follow along in the action run; the reply will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the task runs.
✅ Verdict: approve — no blocking issues found.
Traced the fix through
SyncRepoAsync/NothingToCommitAsync/RecoverAsyncinsrc/ATProtoNet/Spaces/SpaceSyncer.csagainst the new tests. The logic is sound:Partialis now reserved for pages that made progress (applied.Count > 0) or offered a continuation cursor, while a page with neither is routed toNothingToCommitAsync, which correctly branches on whethercursor.Revwas already non-null (fresh cursor -> reportNoRepoimmediately without a wasted round-trip; previously-advanced cursor -> full recovery viaRecoverAsync, which itself already knows how to drop the local copy on aRepoNotFoundfromgetRepo). The new unit tests (SpaceSyncerTests.cs) exercise exactly the three relevant branches — continuation-cursor-forces-Partial, fresh-cursor-never-written, and stale-cursor-now-gone — and the integration test update matches. XML doc remarks and thedocs/spaces.mdaddition accurately describe the new behavior, and the CHANGELOG entry is thorough and correctly filed underFixed. No correctness, security, or documentation issues found.One pre-existing (not introduced by this PR) asymmetry worth a mental note for a future pass: the
RepoNotFound-exception path at the top ofSyncRepoAsync(line 196) returnsNoRepowithcursor.Revleft as-is and without dropping the store, whereasRecoverAsync's missing-repo branch resets the cursor and drops the store. Not something this PR needs to fix, since it's untouched code, but the twoNoRepo-producing paths now differ slightly in what state they leave behind.⏱ 1m 10s · 6 turns · tokens: 37.4k in / 5.8k out (+293.4k cache-read)
📜 Full session transcript