diff --git a/Tests/SafeDIToolFuzzerTests/SafeDIToolGraphFuzzerTests.swift b/Tests/SafeDIToolFuzzerTests/SafeDIToolGraphFuzzerTests.swift index 93bff2709..ae475ddaf 100644 --- a/Tests/SafeDIToolFuzzerTests/SafeDIToolGraphFuzzerTests.swift +++ b/Tests/SafeDIToolFuzzerTests/SafeDIToolGraphFuzzerTests.swift @@ -8035,10 +8035,10 @@ struct SafeDIToolGraphFuzzerTests { /// What the level function capture check judges over the public mock corpus (`Corpus.levelFunctionCaptureCounts`). /// Pins: derived on CI. - static let publicMockCorpusLevelFunctionCaptureCounts = GraphFuzzerLevelFunctionCaptureCounts(judged: 640, judgedWithNamed: 399, named: 1_075, conversions: 0, fills: 504) + static let publicMockCorpusLevelFunctionCaptureCounts = GraphFuzzerLevelFunctionCaptureCounts(judged: 650, judgedWithNamed: 399, named: 1_075, conversions: 0, fills: 504) /// What the retention oracle judges over the public mock corpus (`Corpus.retentionCounts`). Pins: derived on CI. - static let publicMockCorpusRetentionCounts = GraphFuzzerRetentionCounts(judged: 722, judgedDrawingRetentionShape: 131, judgedThroughHandWrittenBuilder: 92, unpairedExperiments: 0) + static let publicMockCorpusRetentionCounts = GraphFuzzerRetentionCounts(judged: 729, judgedDrawingRetentionShape: 131, judgedThroughHandWrittenBuilder: 92, unpairedExperiments: 0) static let seamCorpusSeedCount = 2_000 static let seamCorpusFixtureHash: UInt64 = 0xA2DFC61CD88A5D0C @@ -9694,6 +9694,10 @@ struct SafeDIToolGraphFuzzerTests { .optionalPlacePublicMockReceived: 84, .optionalPlacePublicMockPassedUp: 67, .optionalPlacePublicMockPublicConsumer: 45, + .sendableHolderOfPublicMockCall: 54, + .sendableHolderOfPublicMockCallThroughInstantiator: 32, + .sendableHolderOfPublicMockCallBesideByValueSibling: 40, + .sendableHolderOfPublicMockCallFillReadsHoldersValue: 21, .outerFulfillerPublicMockCall: 112, .unbuildableValuePublicMockCall: 174, .unbuildableValuePublicMockCallPublicTier: 174, @@ -9762,7 +9766,7 @@ struct SafeDIToolGraphFuzzerTests { ] static let publicMockCorpusSeedCount = 1_000 - static let publicMockCorpusFixtureHash: UInt64 = 0x32C6CEEE9631BE2D + static let publicMockCorpusFixtureHash: UInt64 = 0x0EC1F530FC320B24 static let publicMockCorpusAcceptedSeedCount = 854 static let publicMockCorpusAcceptedSeedsSum: UInt64 = 0xA0030516C7DF62F /// How many of the public mock corpus's graphs the tool accepts as drawn and as their known-right path, which the @@ -9824,7 +9828,7 @@ struct SafeDIToolGraphFuzzerTests { /// Pinned by `publicMockSmokeAndKnownIssueFixtureHash`. static let publicMockSmokeSeeds: [UInt64] = [0, 7, 10, 23, 37, 43, 46, 59, 98, 142, 151, 189, 197, 208, 215, 253, 551, 555, 836, 1_339, 1_649, 2_687, 2_840] - static let publicMockSmokeAndKnownIssueFixtureHash: UInt64 = 0x481228257866F044 + static let publicMockSmokeAndKnownIssueFixtureHash: UInt64 = 0xBA85F14186D123AA /// Seeds in `0..") + : Property(attribute: "@Instantiated", label: "pluggedHolder", type: "SendableLazilyInstantiated<\(holder.name)>")] + var consumerDeclarations = [Self.renderer(of: live), Self.renderer(of: holder), Self.renderer(of: host)] + if fillReadsToken { + consumerDeclarations.append(Self.renderer(of: InstantiableClass(name: tokenName, conformances: conformances))) + } + if hasSibling { + var sibling = InstantiableClass(name: name("PluggedSibling"), conformances: conformances) + sibling.mockGeneration = "true" + sibling.properties = [Property(attribute: "@Instantiated", label: "pluggedHolder", type: holder.name)] + consumerDeclarations.insert(Self.renderer(of: sibling), at: siblingFirst ? 0 : consumerDeclarations.count) + } + files.append(File(module: .seamModule, declarations: [protocolDeclaration(apiName), Self.renderer(of: plug)])) + files.append(File(module: consumerModule, declarations: consumerDeclarations)) + } + /// A ring of types that pass to one another the answer to whether a value is handed, read by a call of a public mock, in /// three graphs in ten, its length drawn as the growth rows draw a chain: `RingScreen`, a mocked consumer, `true` or, one /// draw in three, `.public`, builds `RingLink1`, by value or through an instantiator, and declares `ringSession` three @@ -4891,6 +4969,18 @@ extension GraphFuzzerPublicMockDraw { features.insert(.wrapperReadByValuePublicMockReaderThroughInstantiator) } } + if let host = types.declarations["\(prefix)PluggedHost"], let holder = types.declarations["\(prefix)PluggedHolder"], types.declarations["\(prefix)PluggedPlug"] != nil { + features.insert(.sendableHolderOfPublicMockCall) + if host.properties.contains(where: { $0.type.hasPrefix("SendableInstantiator<") }) { + features.insert(.sendableHolderOfPublicMockCallThroughInstantiator) + } + if types.declarations["\(prefix)PluggedSibling"] != nil { + features.insert(.sendableHolderOfPublicMockCallBesideByValueSibling) + } + if holder.properties.contains(where: { $0.label == "pluggedToken" }) { + features.insert(.sendableHolderOfPublicMockCallFillReadsHoldersValue) + } + } if let screen = types.declarations["\(prefix)RingScreen"], types.declarations["\(prefix)RingCache"] != nil { features.insert(.passThroughRingPublicMock) let links = (1...4).compactMap { types.declarations["\(prefix)RingLink\($0)"] }