TCS is very much mathematics, and you're right in noting that more applied / systems CS tends to be closer to engineering>>11340837
Producing code, bug-testing, and software engineering aren't computer science. In fact>>11341124>>computer scientists don't write programs to test algorithms, perform experiments, etc
Usually? Computer scientists prove their algorithms work rigorously, same for their theorems. Any program to test is usually written by an undergrad or grad, but even then the process of bug-testing and producing code is more an act of engineering or in aid to investigation rather than the essence of that investigation or even its main method of inquiry. In practical applications and implementation papers, you'll see people playing around with the algorithm to test, writing programs, etc., but this is the realm of engineering since the study goes into understanding goals, constraints, feasibility, real-world performance, etc, etc.
The computer scientist in theory research does mathematics, and now recently, they tend to sometimes do mathematical science as well if they're in subfields that intersect with natural science (ie the efforts of the human genome project, quantum complexity to study fundamental physics, etc.). Those in systems / AI / etc. have their own mathematics they study, but ultimately a lot of their practical side comes down to engineering research based on heavy use of mathematics you wouldn't see as often in engineering departments (ie, engineering depts tend to apply more mathematics close to physics, while in CS the gamut ranges from combinatorics to analysis).
TL;DR you have little idea what you're talking about and codemonkeying isn't suddenly absorbed into science nor computer science. If anything, it's much closer to engineering principles of blackboxing, unit testing, scalable design, etc.