What is the most accepted mechanism for the reaction of ketones with m-dinitrobenzene? This is a commonly used confirmatory technique in organic functional group analysis. The test is performed by addition of meta dinitrobenzene to the given organic sample followed by addition of a base such as  sodium hydroxide. The indication is given by a violet colouration. 

Is the probable mechanism based on carbanion formation? Also it would be helpful if exceptions to this reaction and other variants in colour produced by different ketones. My main requirement is to know why aldehydes do not respond to this test.
In the Janovsky reaction, an aldehyde or ketone which contains at least one $\alpha$ methylen group reacts with 1,3-dinitrobenzene and a strong base (like $\ce{NaOH}$) to form a colored Meisenheimer complex (source). The enolate acts as a nucleophile which attacks the aromatic ring that is electron-deficient due to the presence of multiple electron-withdrawing nitro substituents.



image source

As the reaction mechanism relies on the formation of an enolate, non-enolizable aldehydes like, for example, formaldehyde or benzaldehyde, do not resond to this test. Likewise, non-enolizable ketones (like benzophenone) cannot react in this way. The color of the formed complex varies with the number of nitro substituents of the benzene ring, with 1,3-dinitro compounds giving blue complexes, while trinitro compounds yield a red coloration (source).

This paper contains a list of the colors produced by various aromatic nitro compounds when reacted with acetone and $\ce{NaOH}$. It is reported that most mononitro compounds do not produce any color at all, with the exeption of 3-nitro-4-aminotoluene (orange) and 3-nitro-4-aminotoluene benzoate (orange-red). Some examples for the colors obtained from the reaction of dinitro compounds are: m-dinitrobenzene (purplish blue), 2,4-dinitrotoluene (blue), 2,4-dinitrophenol (yellow-orange), 2,4-dinitroresorcinol (brownish-green) and p-dinitrobenzene (green-yellow).