Line 3748 of main.js indicates that the correct behavior for gatherers is " //if .max is specified, each single unit can only gather that amount at most, forcing the player to create enough units to match the resources available in owned tiles
However, I don't believe this matches the implemented behavior -- on average, the player is still getting more resources per gatherer, past the maximum.
Consider line 3776:
If I've understood the code correctly, myAmount is the number of gatherers; effect.amount is typically 1 and max is typically 5 (data.js:1505). res[ii] is the total map yield of your given resource.
So, the value inside the randomFloor will simplify to whichever is smaller: 5*# of gatherers, or Math.random()*(map contents)*(# of gatherers). Either way, it's scaling linearly with the number of gatherers. So this code doesn't actually cap out the gathered amount at the map resources. Instead, it makes the map resources give diminishing returns above 5 / day.
I believe the desired behavior would be something more like
but of course I imagine that fixing it at this point would require a lot of rebalancing.
My apologies if I've misunderstood anything in the code, I'm just trying to understand whether the behavior matches the comments.
(Note also that if line 3776 is changed, line 3761 will need to be changed to match.)