Repository navigation
Conversation
The MX, CAA, TLSA, TXT, SRV, and NAPTR reply parsers each repeated the same structure: lazily create the record dictionary template, parse the reply, iterate the answer section filtering by record type, build and append each record, and report ENODATA when nothing matched. Factor that into GetRecordTemplate(), ForEachAnswer(), and AppendRecord() helpers so each parser only contains its record-specific extraction. Behavior is unchanged, including TLSA results being indexed by answer position and never reporting ENODATA. Assisted-by: Claude Signed-off-by: James M Snell <jasnell@gmail.com>
Eleven snapshotable binding data classes implemented Deserialize() with the same sequence of opening a handle scope, looking up the Realm, and recreating the binding data on the holder, and six of them implemented Serialize() by handing over the InternalFieldInfo allocated in PrepareForSerialization(). Add Realm::DeserializeBindingData() and TakeInternalFieldInfo() helpers and use them. Assisted-by: Claude Signed-off-by: James M Snell <jasnell@gmail.com>
Eleven fs bindings (stat, statfs, link, rename, unlink, realpath, readdir, copyFile, chown, lchown, mkdtemp) repeated every permission check in both the asynchronous and the synchronous branch, differing only in whether the denial is reported through the request or thrown. Obtain the request wrap up front with a new GetAsyncReqWrap() helper and perform each check once with FS_THROW_IF_INSUFFICIENT_PERMISSIONS(), which picks the reporting style based on whether the call is async. How permission denials are reported is unchanged. Assisted-by: Claude Signed-off-by: James M Snell <jasnell@gmail.com>
Replace the repeated `if (argc > N) { req = GetReqWrap(args, N);
CHECK_NOT_NULL(req); ...` prologue of the fs bindings that select the
asynchronous path by argument count with GetAsyncReqWrap().
Assisted-by: Claude
Signed-off-by: James M Snell <jasnell@gmail.com>
Collaborator
|
Review requested:
|
Collaborator
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #67497 +/- ##
==========================================
+ Coverage 90.67% 90.70% +0.03%
==========================================
Files 799 799
Lines 280245 280039 -206
Branches 54125 54028 -97
==========================================
- Hits 254100 254014 -86
+ Misses 16280 16215 -65
+ Partials 9865 9810 -55
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reduce code by consolidating cleanup. See individual commits