Due to a zombie lockdown, I had a liaison wandering about, ready to go home, but not allowed. He was visiting every place in my fortress, probably because he was bored. So I was initially not surprised I found him dead in a corridor full of water. But then I started analysing a possible sequence of events, and something wasn't quite adding up.
Legend:
+ door
. tile
> stairs down, to outflow area
X staircase, but there's a dead end one z-level below, fortress is above
O door, unlocked
0 door, machine operated, open, with 7/7 water
7 water tract, with 7/7 water on every tile, some tiles near waterwheels have ramps down to power the wheels
# walls
$ gearbox to vertical power shaft
* normal gearboxes for waterwheels
W waterwheels
| horizontal axle
1 place where rotten body found
outflow area is z-level below
#####
##WWW#
#*WWW#
#|WWW#
#|WWW#
#*WWW#
##|WWW#
#>|WWW#
#$*WWW#
#.#WWW#
####O#####
7770707777 water source few z-levels up
####O#####
#1#
#.##
##.##
##X#
###
fortress side
In retrospect, crossing maintenance footpath with waterway wasn't the best engineering practice. And leaving doors unlocked wasn't that good too. Still, this wasn't technically an oversight, I just assumed my dwarves won't travel there because there's nothing to do. And you know, the 7/7 water tile, which normally prevents pathing. But the path south of crossing was full of water (7/7), and the north had some too, which suggested the liaison opened both doors on his own, got knocked down by water and was drown. But to be absolutely sure what has happened, I loaded the archive save from previous month (a first baby was born then, so I had such a recent save ready).
Fortunately, I found the liaison, still alive, on the "outflow" side, in a channel one level below. To my surprise, he was dry as a bone, and there were no marks of water nor mud on both south and north side of doors. How did he get here? I unpaused the game. The liaison was walking up and down the channel for a longer while, but then changed his mind, and climbed up the axle shaft, not one level but two (not pictured here). From there he had a perfect path to the fort, leaving the power station below him. But what did he do? He went down the staircase, to the level pictured, went to the southern door, opened it, and was immediately stunned by wall of water on spot "1". In this timeline he wasn't killed though, instead the door immediately closed, so there was like 1-2/7 of water, and after regaining posture he went back to the staircase and returned to the fort, wet but alive.
So I concluded that, in my true timeline, he used the shaft to avoid the water corridor when going to inspect the machinery, but for some reason he went back the "normal way", that is through unlocked northern door, and then southern one. He surely was already partially stunned when opening the second, southern door, and this slowed him so the water was able to fill the corridor before the door closed. And he was stunned finally and died on "1" spot, because his body and all belongings lie here.
Now this explain the manner of death, but doesn't explain the motive. Why was he pathing through axle shafts in the first place, if he is able to path through water tile? Why was he able to path through water tile, without a reason to do so, and why he did that? What the hell was he doing in my machinery room? He wasn't a mechanic, he was a ranger, with crossbow and all.
And finally: was it a suicide or an accident?
As a side note, I'm unhappy with the whole situation, because that probably means the trade agreement won't be affective, and my stack of amulets and earrings won't be worth much when the caravan arrives, plus they may be short of wares I supposedly ordered through the liaison six months earlier. Hope the next liaison will be less adventurous and more prudent