I wonder though, how different are the file edited with ed and the one edited with vi. Maybe ed fails to update the "date modified" under these conditions?
Yeah I feel the right way to solve this bug (in the compiler) would be to stat the file. Or maybe docker mounts it with -noatime (or something similar?)