     let diagnostic = Diagnostic(message: message,
                                 node: node,
                                 actions: actions)
+
+    if let activeID = self.activeTransaction {
+      self.transactionDiagnostics[activeID, default: []].append(diagnostic)
+      return message
+    }
+
     diagnostics.append(diagnostic)
     for consumer in consumers.values {
       consumer.handle(diagnostic)

    return diagnostics.contains { $0.message.severity == .error }
  }

  /// Emits a diagnostic message into the engine.
  ///
  /// - Parameters:

  /// The current set of emitted diagnostics.
  private(set) public var diagnostics = [Diagnostic]()

  /// The set of in-flight diagnostics for a particular transaction.
  private var transactionDiagnostics = [Int: [Diagnostic]]()

  /// The current transaction.
  private var activeTransaction: Int?

  /// The set of consumers receiving diagnostic notifications from this engine.
  private(set) private var consumers = [UUID: DiagnosticConsumer]()

  /// The next available (unique) transaction ID.
  private var transactionIDPool: Int = .min

  /// Creates a new DiagnosticEngine with no diagnostics registered.
  public init() {}
