I'm trying to remember another book I read a couple times.
No memory of the author or title, so hoping I can describe it will help. Spoilers ahoy
Short version, space fiction, set on Earth, and a warship belonging to the latest warlord arrives. The warlords think that if they can conquer Earth they will rule, and the locals are tired of that. Seems whenever someone tries to conquer Earth, they wind up making a bigger mess for the locals to deal with.
One of the locals is appointed 'in charge' to deal with them. As such the representative has authority to increase reqwork and decrease comptime as needed to get things don (those are the actual words from the book). He gives them a basic tour of the region where the warlord' ship landed, and warns them not to go off due to dangerous critters. One of the critters shows up, the representative deals with it, and the warlord + troops are brought back to their ship, and he reminds them not to go off alone. Next day, the warlord and some troops go off alone. They come back minus several troops, and the representative chews them out over it, and says h is not responsible for their stupidity.
While the representative is talking to the warlord, the Earth people are also diverting their work from repairing the planet, to repairing the orbital defense network.
Grand finale, the warlord's ship is eventually shot up enough that the warlord surrenders, but more damage is done to Earth from the fight. Representative eventually tells the warlord to just leave, as whenever a wannabe conqueror arrives, Earth just gets hurt even more.
It also had several interesting philosophy commentaries in it, which were enjoyable (and disturbing) to read. Wish I could remember it (the only thing I have tried to google search on it reqwork and comptime, and no luck).