Delete per-schema files that no live schema claims, returning what was removed.
A schema that empties out — its last table dropped — leaves its file on disk. The barrel
stops exporting it, which is not enough: tsc still compiles it through include, the
class-registration manifest still globs it into the registry, and the CodeGen-tail guard
reads every .ts in the directory regardless of what the barrel names. So a deleted
entity keeps a live @RegisterClass registration and inflates the roster the guard
compares. The old monolith could not drift this way; it was rewritten in full every run.
Safe under dirty-schema regen: schemas is the full set for the run, so a schema that
simply was not dirty this time is still live and is never pruned.
Delete per-schema files that no live schema claims, returning what was removed.
A schema that empties out — its last table dropped — leaves its file on disk. The barrel stops exporting it, which is not enough:
tscstill compiles it throughinclude, the class-registration manifest still globs it into the registry, and the CodeGen-tail guard reads every.tsin the directory regardless of what the barrel names. So a deleted entity keeps a live@RegisterClassregistration and inflates the roster the guard compares. The old monolith could not drift this way; it was rewritten in full every run.Safe under dirty-schema regen:
schemasis the full set for the run, so a schema that simply was not dirty this time is still live and is never pruned.