bin/install.js held byte-identical duplicate definitions of the augment converter family (convertSlashCommandsToAugmentSkillMentions, convertClaudeToAugmentMarkdown, getAugmentSkillAdapterHeader, convertClaudeCommandToAugmentSkill, convertClaudeAgentToAugmentAgent) that already exist canonically in src/runtime-artifact-conversion.cts (generated to gsd-core/bin/lib/runtime-artifact-conversion.cjs). Deferred Phase 1->2 cleanup tracked in #1675 (epic #1507 / ADR-1508). Deleted the five local copies; install.js now binds the three PUBLIC converters from runtimeArtifactConversion (same pattern as getDirName / processAttribution in #1510). The two private helpers live only in the conversion module now. module.exports preserved (re-exported). Behavior-preserving: four converters byte-identical; the fifth (convertClaudeAgentToAugmentAgent) differed only by an inert let->const (variable never reassigned). Extends the DEFECT.GENERATIVE-FIX reference-identity parity guard in enh-1511 to assert single-sourcing. Closes #1675
This commit is contained in:
@@ -378,4 +378,31 @@ describe('single-owner reference-identity guard (ADR-1508 / #1511 Phase 2)', ()
|
||||
'install.js must bind _applyRuntimeRewrites from conversion (not a local shim)',
|
||||
);
|
||||
});
|
||||
|
||||
// #1675 (ADR-1508): the augment converter family is single-sourced in the
|
||||
// conversion module. install.js must re-bind (not re-define) these so there
|
||||
// is exactly one body — the generative-drift hazard the dedup removes.
|
||||
test('install.convertClaudeToAugmentMarkdown === conversion.convertClaudeToAugmentMarkdown (single converter)', () => {
|
||||
assert.strictEqual(
|
||||
install.convertClaudeToAugmentMarkdown,
|
||||
conversionCjs.convertClaudeToAugmentMarkdown,
|
||||
'install.js must bind convertClaudeToAugmentMarkdown from conversion (not a duplicate body)',
|
||||
);
|
||||
});
|
||||
|
||||
test('install.convertClaudeCommandToAugmentSkill === conversion.convertClaudeCommandToAugmentSkill (single converter)', () => {
|
||||
assert.strictEqual(
|
||||
install.convertClaudeCommandToAugmentSkill,
|
||||
conversionCjs.convertClaudeCommandToAugmentSkill,
|
||||
'install.js must bind convertClaudeCommandToAugmentSkill from conversion (not a duplicate body)',
|
||||
);
|
||||
});
|
||||
|
||||
test('install.convertClaudeAgentToAugmentAgent === conversion.convertClaudeAgentToAugmentAgent (single converter)', () => {
|
||||
assert.strictEqual(
|
||||
install.convertClaudeAgentToAugmentAgent,
|
||||
conversionCjs.convertClaudeAgentToAugmentAgent,
|
||||
'install.js must bind convertClaudeAgentToAugmentAgent from conversion (not a duplicate body)',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user