drift-sweep was red on 32 refdata generated files, and regenerating fixed it

Table of Contents

This page is a capture in the inbox bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.

1. What

(One paragraph: the idea.)

2. Why

(Motivation, problem being solved, related context.)

3. References

4. See also

5. The cost, learned the same way

compass codegen regenerate rewrites every file the component owns, whether or not the content changes. mtimes move for all of them, so a regeneration that changes nothing still invalidates the build cache: the next build recompiles the whole component. Measured here — the ores.ore.core.tests build that started at 00:41 restarted at 730 objects and 40% because the refdata regeneration above had touched the component's sources.

So "regenerate and see if anything changed" is not a read-only drift probe. The read-only version is to hash the generated tree, regenerate, and hash again. Use the regeneration itself only when the drift is real.

Emacs 29.3 (Org mode 9.6.15)