chore: remove dead templates/ build toolchain and orphaned cdmq scripts - #209
Conversation
templates/*.base + build.sh/Makefile/init.sh/create-*-cmds.sh formed an OpenSearch template/index-creation toolchain that queries/cdmq/cdm.js's indexDefs (the actual live schema, used by every real indexing run via add-run.js) fully superseded. Confirmed via exhaustive grep across this repo, crucible's bin/, and every other subproject: zero live references except templates/delete.sh, which stays (used by crucible's reinit_opensearch()). queries/cdmq/create-index.js and get-instances-info.js are likewise unreferenced (no wrapper script, no README mention, no CI usage) -- superseded by start-server.sh's own index-creation path. setup.sh is a documented-but-unused manual convenience; CI and start-server.sh both install dependencies directly via npm. No behavior change -- these files were not invoked by any script, CI workflow, or documented workflow.
templates/README.md and CLAUDE.md's Templates section described the build.sh/Makefile/init.sh/create-*-cmds.sh toolchain deleted in the previous commit as if it were still the current setup process. Point both at queries/cdmq/cdm.js's indexDefs, the actual live schema source, and describe templates/ as containing only delete.sh going forward.
PR Review: CommonDataModel#209 — chore: remove dead templates/ build toolchain and orphaned cdmq scriptsSummary: Removes the obsolete OpenSearch index template-generation toolchain and unreferenced Documentation
File Coverage
Missing from diff:
LimitationsThis review was conducted statically. It does not verify runtime behaviors on a live OpenSearch instance or direct interactions with external running Crucible harness nodes. However, exhaustive static analysis confirms zero active callers or dependencies on any of the removed files. VerdictApprove with comments — The PR is functional, clean, and completely safe to merge since all deleted scripts have been verified to have zero active callers or dependencies in the organization. The stale documentation references identified above are non-blocking but should be addressed in a follow-up commit or pull request. |
README.md and queries/cdmq/README.md still described OpenSearch index templates and ./setup.sh as current, both removed in this PR. Point readers at cdm.js's indexDefs and npm install instead.
|
Thanks for catching these — fixed in commit b0cd434:
Same rationale as the |
atheurer
left a comment
There was a problem hiding this comment.
LGTM! Clean removal of obsolete templates and cdmq scripts while preserving delete.sh and updating documentation to point to cdm.js as the single source of truth.
Summary
templates/*.base+build.sh/Makefile/init.sh/create-*-cmds.shOpenSearch template-generation toolchain.queries/cdmq/cdm.js'sindexDefsobject is the actual live schema definition — used by every real indexing run viaadd-run.js, which validates document fields against it before ever reaching OpenSearch. Thetemplates/toolchain has zero live callers.queries/cdmq/create-index.jsandget-instances-info.js(no wrapper script, no README mention, no CI reference —start-server.shalready handles index creation on its own) andsetup.sh(a documented-but-unused manual convenience; both CI andstart-server.shinstall dependencies directly vianpm ci/npm install).templates/delete.sh, which is genuinely live — invoked by crucible'sreinit_opensearch()inbin/base.grep -rnacross this repo, crucible'sbin/,.github/workflows/, and every other subproject in the org for each filename before deletion.templates/README.mdand this repo'sCLAUDE.mdTemplates section, which described the removed toolchain as the current setup process — both now point atcdm.js'sindexDefsas the real schema source and describetemplates/as containing onlydelete.sh. Bundled into this PR (rather than deferred) so the deletion and the docs describing it land atomically, with no window where merged docs describe commands that no longer exist. A handful of other pre-existing, unrelated stale-doc findings from the same audit (a false Prettier-CI-enforcement claim, missing web-ui routes, stale aggregation methodology docs) are NOT part of this PR — they're independent of this deletion and will be a separate follow-up.Test plan
node --checkon every remaining.jsfile inqueries/cdmq/— all passrequire()/reference to the removed.jsfiles anywhere in the repopackage.jsonhas no script entries referencing any removed filetemplates/delete.shis unaffected and still self-contained (no dependency on any removed file)🤖 Generated with Claude Code