At a previous employment, a project manager (PM) wasn't satisfied with the delivery time of the code on a project I was on. I was told by my project lead that that the PM was considering having me sign a contract to lock-in my time estimates I gave for tasks and delivery dates. 

The situation on the project was that we were working with new technologies, codebase, coding standards, and very prone-to-change requirements. I was learning new things and applying them the best I could on requirements that kept on changing. The requirements throughout the iterations grew by 2-3 times, with my estimate-to-complete growing by roughly 5-8 times. The only things that didn't change were the estimates and delivery dates.

Yes, I did end up missing most deadlines. And I was working on some very new technologies that no one else on the entire development team could really help out on because they wouldn't be familiar with it. At least not easily.

It seemed to me then, that the PM wanted his numbers to add up-- and thus wanted me to sign a contract to "ensure" that I would always deliver working code on time. I suppose with a signed contract the PM could use it against me if I couldn't deliver on time.

I believe what happened next was that other project managers and/or project leads defended me, and didn't let this happen.

My question is, should this raise a red flag about the manager? Is it common practice for a manager to lock-in time estimates of a software developer with a signed contract? Or in this case, try to.

Please note, I was a full time employee, not an independent consultant.

Update:
I want to add that I did give new estimates weekly, but it seems the original estimates and delivery dates were what the PM was fixated on.


  My question is, should this raise a red flag about the manager? 


Yes. It means it is time for you to get your resume/CV up to date and start looking for a new job. Or it means that your manager is about to start playing some very nasty games with you. 


  Is it common practice for a manager to lock-in time estimates of a software developer with a signed contract?


I've never heard of this being applied to an employee. 

Time and effort estimation is always difficult. Especially since our profession is full of excessive optimism. There are some estimation systems that could help with estimates in the future, but they need collecting historical stats from yourself. One is PSP. Another is Function Points. Many developers like neither, and you'll find very strong opinions against both of them. 

The key difficulty in estimating time and effort is the lack of feedback in our estimation heuristics. One of the keys is to write down what you think the estimate is, and what parameters you used to estimate it. Then, based on what you actually get done, compare that with what you thought you'd do. And use that to modify your estimation parameters. In engineering, we call this "feedback." 
