mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-22 10:33:13 +00:00
The warning said to set application.mode and stopped there. Following that on a running process does not close anything: buildRouter has one call site, in run(), and route registration is on no phase and no reload callback, so a configuration reload moves the mode and leaves the routes exactly where they were. The reader is then worse off than before they acted. The mode now says prod, GenWriteRoutesEnabled agrees, and the endpoints are still served - so the one thing they could check to confirm the fix reports success while the exposure is untouched, until something restarts the process. A test pins the gap rather than the prose: build under dev, move the mode to prod, and the routes are still in the engine. It fails if registration ever becomes dynamic, which is the change that would make the new sentence wrong. That test degrades differently from the others - making it fail means rewriting registration, not weakening it - so what was checked instead is that it cannot go vacuous. Both of its premises are guarded: with the gate always refusing it reports building under dev without the writing routes, and with the gate always allowing it reports the predicate still allowing prod. Neither failure can be mistaken for the assertion passing. Raised by Copilot on #917.