Phase 1 of epic #1507 (ADR-1508): behavior-preserving relocation of the pure rewrite-engine helpers out of the hand-authored installer so the conversion module can own them without importing bin/install.js. - getDirName -> src/runtime-name-policy.cts (pure runtime->dir-name switch). - processAttribution -> src/runtime-artifact-conversion.cts (pure Co-Authored-By content transform). - bin/install.js imports both back via destructure/binding and re-exports getDirName unchanged (Hyrum: install.test.cjs + runtime install tests import getDirName from bin/install.js). Two refinements to ADR-1508's Phase 1 (verified against the source): - getCommitAttribution STAYS in bin/install.js: it is impure install-time config I/O (reads runtime settings.json, uses install-time config-dir state + attributionCache), not a content transform. Phase 2 will inject the resolved attribution into the engine rather than move this function. - The convertClaudeToAugmentMarkdown dedup is deferred to Phase 2's cleanup: the local copy is entangled with a converter cluster (convertSlashCommandsTo AugmentSkillMentions is used only by it; the family is partly dead-local via the ...runtimeArtifactConversion export spread), deduping only augment would be arbitrary, and it is not required to unblock Phase 2 (the engine will call the conversion module's own copy when it moves). New tests/enh-1510-*.test.cjs: getDirName at its new home (all runtimes + fallback + install.js re-export identity) and processAttribution (null/undefined/string/$-escape/CRLF/global). 487 affected-suite tests green. Claude-Session: https://claude.ai/code/session_0187qgypdy1wkWRpdaf2hRuD Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4.5 KiB
4.5 KiB