Is it "a grammar mistake" or "a grammatical mistake"
It seems to me that when we say "a grammatical mistake" it means a mistake that is grammatical in nature (something that is grammatical can't be a mistake, right?!), so i'd say "a grammar mistake" is correct. However, I've seen a lot of controversy about it. which one is correct?
thanks in advance
Either is fine. In your examples, grammatical is an adjective and grammar is an attributive noun, which is a noun functioning as an adjective (also called a noun adjunct).
From the Wikipedia article:
It is a trait of natural language that there is often more than one way to say something. Any logically valid option will usually find some currency in natural usage. Thus "erythrocyte maturation" and "erythrocytic maturation" can both be heard, the first using a noun adjunct and the second using an adjectival inflection.
According to COCA(https://www.english-corpora.org/coca/), Ngram(https://books.google.com/ngrams) and English Web 2020(https://sketchengine.eu/), both "grammar mistake" and "grammatical mistake" are correct.
I think your assumed definition of "grammatical" may be wrong. It is generally (and in this example) used with the meaning "relating to grammar".
So a "grammatical mistake" is a mistake relating to grammar.
In the same way, you can say something is "gramatically correct", or "gramatically incorrect" i.e. - correct with respect to grammar, or incorrect with respect to grammar.
The other meaning of grammatical, which I think is rather misleading and perhaps used too often on this forum is essentially "correct with respect to grammar". So this second form of "grammatical" means "grammatically correct".
"Grammar mistake" sounds to me a little clunky and odd, as it is generally used as a noun, but I wouldn't say it's downright wrong. I would personally favour "grammatical mistake".