refactor: remove stale Source: sdk/src generated-file banners from bin/lib/*.cjs (#510)

* refactor: remove stale sdk/src generated-file banners from bin/lib/*.cjs (#506)

Drop the GENERATED FILE / Source: sdk/src / Regenerate: cd sdk banners from
13 hand-maintained CJS modules and delete the orphaned
generator-freshness-contract script + test. Post-ADR-0174 cleanup; the
referenced sdk/ generator pipeline (dir, gen:* scripts, *.generated.cjs) no
longer exists. No runtime behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: add changeset for #510 (sdk/src banner cleanup)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-05-30 17:06:23 -04:00
committed by GitHub
parent 6f2520786d
commit 0008244245
16 changed files with 9 additions and 121 deletions

View File

@@ -1,31 +0,0 @@
'use strict';
const GENERATOR_FRESHNESS_REASON = Object.freeze({
FRESH: 'fresh',
STALE: 'stale',
MISSING_SOURCE: 'missing_source',
MISSING_GENERATED: 'missing_generated',
});
/**
* Compare source and generated artifacts by content hash-equivalence contract.
* @param {{source?:string, generated?:string}} input
* @returns {{ok:boolean, reason:string}}
*/
function evaluateGeneratorFreshness(input) {
const source = input?.source;
const generated = input?.generated;
if (typeof source !== 'string') {
return { ok: false, reason: GENERATOR_FRESHNESS_REASON.MISSING_SOURCE };
}
if (typeof generated !== 'string') {
return { ok: false, reason: GENERATOR_FRESHNESS_REASON.MISSING_GENERATED };
}
if (source === generated) {
return { ok: true, reason: GENERATOR_FRESHNESS_REASON.FRESH };
}
return { ok: false, reason: GENERATOR_FRESHNESS_REASON.STALE };
}
module.exports = { GENERATOR_FRESHNESS_REASON, evaluateGeneratorFreshness };