From 2a19d6502bb75cc4632122874740fe339af44281 Mon Sep 17 00:00:00 2001 From: ciotlosm Date: Sat, 11 Jul 2026 14:11:52 +0300 Subject: [PATCH] fix(vendor): include README + SHARED-STANDARDS in consumer sync The vendor script was skipping two files (`standards/README.md` and `standards/SHARED-STANDARDS.md`) at both vendorLocalMode and prMode, on the rationale that the manifest and the index should stay canonical-only in this repo. The problem: every consumer repo (`n3ary/app`, `n3ary/gtfs`, `n3ary/gtfs-adapters`, ...) already had older vendored copies of both files, written by an earlier version of the sync process. The shared drift check in `n3ary/actions` (check-standards-drift.yml) iterates every `docs/standards/*.md` and compares the sync-header SHA against the latest on `n3ary/standards@main` that touched `standards/`. Files with a stale header that are NOT re-vendored produce drift noise on every consumer PR, forever. Surfaced by n3ary/gtfs-publisher PR #186, where the manual vendor missed the two files and the drift check reported: Drift: docs/standards/README.md vendored at 957883b, latest is da0a851 Drift: docs/standards/SHARED-STANDARDS.md vendored at 957883b, latest is da0a851 Removing the skip aligns the script with the drift-check contract: the source of truth owns the file list, the consumer reflects it verbatim, and the check has nothing left to complain about. The per-consumer `skip` set (e.g. n3ary/app's local-only feed-agnostic.md) is preserved for genuinely local content. --- scripts/vendor-standards.mjs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/vendor-standards.mjs b/scripts/vendor-standards.mjs index 0bd409c..d8ccdb9 100644 --- a/scripts/vendor-standards.mjs +++ b/scripts/vendor-standards.mjs @@ -131,7 +131,6 @@ function vendorLocalMode(targetDir) { mkdirSync(targetDir, { recursive: true }); for (const file of listStandards()) { - if (file === 'README.md' || file === 'SHARED-STANDARDS.md') continue; // manifest + index stay canonical-only const original = readFileSync(join(STANDARDS_DIR, file), 'utf8'); writeFileSync(join(targetDir, file), vendorContent(sha, date, original)); } @@ -154,8 +153,16 @@ function prMode() { for (const consumer of CONSUMERS) { try { + // Every file under standards/ gets vendored. The shared + // n3ary/actions drift check (check-standards-drift.yml) iterates + // every `*.md` under the consumer's vendor dir and compares the + // sync-header SHA against the latest on this repo's main that + // touched standards/. Skipping files here creates permanent drift + // noise on the consumer: the file is still present in the + // consumer (with an older sync header) and the check sees the + // mismatch forever. Only the per-consumer `skip` set (e.g. + // n3ary/app's local-only feed-agnostic.md) is honoured. const filesToVendor = listStandards() - .filter((f) => f !== 'README.md' && f !== 'SHARED-STANDARDS.md') .filter((f) => !consumer.skip.has(f)); const hasChanges = filesToVendor.length > 0;