Highlights for the fflib authors (read the fflib findings):
equals without a matching hashCode in fflib_QueryFactory, found by both sets of ascents.
Two factories that are equal can have different hash codes, so aSetorMapcan hold both. The testdeterministic_toSOQLrelies on this: it puts two equal, empty factories in aSetand expects both to stay. A plain fix is hard because a factory changes after it is built, so a hash based on its query would change while it sits in a collection. The options are to drop theequalsoverride or to document that factories must not be used as keys. The agent only suppressed the PMD warning.
fflib_Objects where a Set lookup would do.
containsAll(Set)andcontainsNot(Set)search the whole object list once for every value they check, so the cost grows with the list size times the number of values. Building a Set from the list once per call makes each check a hash lookup. This is the one performance win whose benefit grows with the input, not just with the repeated input of a headroom test.
fflib_StringBuilder that is easy to break, found by both sets of ascents.
The constructors, including those ofFieldListBuilder, call the public virtualadd(String), so a subclass that overridesaddsees every value. Nothing documents or tests that contract, and the kept change that calledbuffer.adddirectly broke it with every test still passing. The comment "Create a distinct set of fields" is also wrong: nothing removes duplicates, so a field listed both directly and in a field set is selected twice. The tests compare the output as aSet, so they check neither duplicates nor order.
fflib_SecurityUtils that fails with a bare NullPointerException on an unknown field name, found by both sets of ascents.
checkFieldIsReadable,checkFieldIsInsertableandcheckFieldIsUpdateablelook a field name up withfflib_SObjectDescribe.getFieldand callgetDescribe()on the result without a null check. A name the object does not have, such as a typo or a field that only exists in some orgs, throws "Attempt to de-reference a null object" without naming the field. Throwing an exception that names the object and field would make the failure clear. Verified in a scratch org withOpportunity.LastSyncTimeandAccount.NoSuchField__c.
fflib_SObjectDomain.getChangedRecordsreads the lazyExistingRecordsgetter three times per record and reads the Id with a dynamicget('Id'). Reading the map once before the loop and usingrecord.Idremoves that per-record work.fflib_SObjectUnitOfWorkresolves relationships in the update pass for every type, including types with no dirty records whose relationships were already resolved before insert. Skipping those types saves a second pass over every relationship.fflib_SObjectDescribebuilds its cache key withString.valueOf(token).toLowerCase()on every lookup by token, where theSObjectTypetoken itself would work as the key. The kept change also made lookups by name slower, so only the keying is worth taking.
fflib_SObjectDescribe.
The private abstract classNamespacedAttributeMaphas a no-argument constructor and a one-argumentgetObjectthat neither subclass calls, andgetDescribe(String)has a branch that assigns null to a variable that is already null. This is cleanup, not a defect: removing it changes no behaviour.