refactor: debloat the Lexicon clients, Admin, Aspire hosting and Lexicon tool #199
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/ATProto.NET!199
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-196-lexicon-debloat"
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 #196.
Line reduction in the Lexicon surface, with no public API or behaviour change (
PublicAPI.*.txtuntouched; every public member keeps its XML doc).PdsAdminClient. Thevar parameters = new XrpcParams()…; return _xrpc.QueryAsync(…)blocks are now single expression-bodied members. Methods that only awaited a procedure now return theTaskdirectly, which saves a state machine per call. Every droppedasyncwas checked: none wrapped ausingortry.returnmembers became=>, and needless braces were dropped (PdsAdminClient, the Aspire hosting extensions,LexiconDiffer).SdkSource.Parameters.cs) now also recognises an inlinenew XrpcParams()at the call site.Net:
src+tools−673 lines. Build has 0 warnings; 4964 unit tests pass.🤖 Generated with Claude Code
🤖 Reviewing this PR — the review will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the review runs.
✅ Verdict: approve — no blocking issues found.
Clean mechanical debloat. I verified the risky parts of the refactor directly:
async: every remainingasync Taskmember in the Lexicon surface is one with real surrounding logic (validation likeThrowIfNull, result unwrapping, retry/polling loops,using/try). None of the converted passthroughs wrapped ausing,try, or argument validation that would have moved from deferred (faulted task) to eager throwing, so the observable behaviour is unchanged. Removing the internal.ConfigureAwait(false)is correct — for a pure passthrough with no state machine the decision rightly moves to the caller.async Task→Taskis signature-identical, and thePublicAPI.*.txtfiles are indeed untouched; all XML docs were kept on the converted members.new XrpcParams()recognition composes correctly with the existingvar parameters = …declaration path — the inline branch only scans the statement starting at the call line, so declaration-style call sites can't be double-counted, and line locations are computed at test runtime so nothing goes stale with the line shifts.PdsAdminClient, andLexiconDifferare all single-statement bodies; no dangling-elseor multi-statement hazards.The CHANGELOG entry fits the file's existing conventions. Approving; nothing blocking.
⏱ 1m 58s · 13 steps · $0.0374 · tokens: 128.6k in / 1.3k out (+484.1k cache-read) · Go: 5h 0% · wk 0% · mo 90%
📜 Full session transcript