Sounds like the old problem with MkIV's...
The lock assembly itself has a few microswitches in it, two of which confirms locked/unlocked position, and one which tells the car that the driver's door has been opened. (there's no pin-switch in the door frame as in days of old... now it looks at the switch inside the lock.
You can see how it works on your (still working) passenger side by taking a lollipop stick/screwdriver/mucky finger and -with the door swung wide open, push the lock-latch FULLY in (to its second 'click' and you'll see that the door thinks it's closed, and the lights will fade off after the usual amount of time. It thinks the door is closed even though it's still swing wide open. If you have the DIS, the DIS will also show the door as being closed. -Now 'pull' the door handle (inside or outside) and the DIS (with the key in the ignition and engine running) will tell you that the door is open, the puddle light will come on, etc.
SO...
What's happening in your driver's door is that it thinks it's closed all the time, even when its open. That means that it never thinks you're opening the door, so it doesn't turn on the puddle light, doesn't alert you in the DIS that you've left a door open (if you ever do), and also locks the car and re-arms the alarm if you don't start the engine in time. (The car has been programmed to re-lock itself in case the owner ever presses the remote button by accident and unlocks the car after a locked state, but doesn't get in for 60 seconds or whatever... it sort of assumes "well, he's nog getting in, so it must have been a mistake..." sort of thing.
You can check the state of that switch in VAG-COM.
I've repaired it in MkIVs (and that's what EVERYTHING in this post is based on so far...) but I bet it's similar for the MkV...
In the MKIV, you have to remove the door panel, take out the window, then remove the lock module.
Once on the bench, dismantle the lock module, TAKING PHOTOS AS YOU GO. You'll almost certainly find a few microswitches, and you'll have to use a multimeter/continuity buzzer to see what's what... but on the MkIVs, the solder connections where the board meets the connector tend to become brittle and look like 'dry joints' (also called "cold solder joints in the US). Take some solder braid and remove the old, grey, crystalline, dull-looking solder, then clean with alcohol or flux, and re-flow the solder... after first having checked that the switch itself changes state (there should be three terminals on most microswitches, one common terminal and two 'pole' terminals. The common terminal conects alternately to one then the other 'poles', switching when the button is activated... check with a continuity tester and then follow the wires/PCB traces through and find where it fails.
Inside the MkIV lock assembly, there's a few spiral springs, and a centrifugally-sprung motor which 'connects' mechanically (when spun) to the worm-screw-threaded rod which lifts and drops the little 'door locked' pin. (which isn't in the MkV A3... though the vestigial remnants may be inside the lock module, in case they're used in other platform-sisters... I won't know until I've looked inside one)
So... if you fancy 'boldly going where no man has gone before' (to split an infinitive!), then I'd suggest puling it apart, -I'm pretty certain that you need the lock module repaired or replaced. -The dealer will only replace it, I'm sure.
In the MkIV, the problem occurs soonest in cars owned/driven by people who slam the doors hardest. -The inertia/mass of the cable harness coming from the connector 'flexes' when the door is slammed shut, and this continual bending stresses the solder joints. It's also why it happens to the most used doors first. -On my car, the driver's door followed by the driver's-side rearpassenger door, followed by the passenger-side rear door... corresponding EXACTLY to the frequency of use...
If you replace the module, I might be interested in performing an autopsy on the old one... Then I can post pictures for everyone, if I get it to work.
Keith