Because it depends. If I'm in the design phase of the project, the architect often gets final say but may defer to the DB guy. While some decisions are based on customer requirements, internal architecture decisions are not. Later on in the project when we're testing usability, of course the beta testers (customer) have the final say. In the middle, when a complex product has hundreds or thousands of "issues" that aren't necessarily bugs but are a composite of feature requests, usability requests, and bugs with workarounds, then the folks that prioritize these things have the final say.
I would say customer, because CEO and other people just there for say "Yes it will done.." to customer, And then pass massage to developer to finish work. No matter how much extra time we have to work for finish that work. even some CEO also can't say customer to leave it for tomoro, they just say "yes" and tell us(developer) to work even it is midnight..
You need to stand up for yourself. I will on occasion (1x/yr) stay late for a project. But if it is a common practice for you then the project manager needs to be replaced, or you should get a new job. I refuse to work for a company that has no idea how to manage programmers. I have a life beyond 8 hrs/day of work. It is people that always say yes that drives the payscale down. Just say no. Without the programmer, there is no software or CEO.
Also of note is that without micro management I can do 16 hrs of work in 6 without them, or 1 hr worth in 16, their choice.
My projects are usually 2 months long or so on average. And I can out program most people (high achiever, 30 years of programming experience). My boss never questions my timeline, or quality of code. I will review progress 5 minutes/week because I want to. Zero pressure. My work is always complete, and on time. And I always make my boss look great by delivering.
One from the people that you know is always most competent in the question. It is safe to follow most competent opinion. It is a waste of time to even consult with someone less competent unless most competent did suggest to. So the counterquestion is: Who is most competent of them?
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
Probably means it's up to him to shape the CEOs position. If the developer does not listen to the customer and CEO he's an idiot, conversely if the CEO does not listen to the developer you have a disaster.
The senoir developer (or possibly the artichtect/BA) should have the final word but he/she had better be right and bloody good as well.
I would say 'Architect' has more command and responsibility than the Manager or other Technical Leads for the simple reason, he knows in's and out's of the product along with any risks involved in any of the modules of the application.
I picked the CEO, and I'm kinda surprised most people didn't. Ok, this only goes for small companies, but... While I think the customer has some very major influence on what gets done, it's ultimately the boss that determines if we'll do it, etc. So, the end result is he has the final say-so - well after usually talking to me about it.