From 462bdf48ee920e32377d130419a637c07d14d684 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 21 Apr 2026 19:36:52 +0000 Subject: [PATCH] refactor(scripts): extract shared sync helpers into scripts/lib/sync.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: ✗