mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-19 19:36:04 +00:00
Both sync-schemas.ts and packages/codex-plugin/build.mts were hand-rolling
the same "compare source to target, print drift, exit 1 in --check mode"
pattern with slightly different output shapes. Extract:
- walkFiles(root, filter?) — recursive relative-path lister shared with
the codex-plugin drift checker
- reportAndExit(drifted, { checkMode, label, fixCommand }) — prints a
unified ✓/✗ summary, caps drift list, exits non-zero in check mode
Both callers now produce the same output shape so contributors see the
same UI whether they're syncing schemas or the codex plugin:
✗ <label> is out of sync:
changed <path>
missing <path>
extra <path>
Run `<fix command>` and commit the result.
Verified: lint, format:check, sync-schemas:check, check:codex-plugin all
pass. Drift injection tests pass on both sync paths. Pre-commit hook still
auto-rebuilds the plugin skills/ copy on source changes and correctly
skips when only the plugin copy is edited (no clobber cycle).