API/TypeSchema: migrate package defect handling into CanonicalManager (#128)#173
Draft
ryukzak wants to merge 1 commit into
Draft
API/TypeSchema: migrate package defect handling into CanonicalManager (#128)#173ryukzak wants to merge 1 commit into
ryukzak wants to merge 1 commit into
Conversation
59927b5 to
294c216
Compare
#128) Design + phased execution plan for #128: move package/SD defect-handling transformations (preprocessPackage patches, skip-hack exclusion, ignorePackageIndex) out of codegen into CanonicalManager via a composable patch API, with a packageIndex mode, index-level exclusion, and a diagnostics report. Future codegen-side changes for this effort will land in this PR.
294c216 to
50f4f10
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft PR tracking #128 — moving package/StructureDefinition defect-handling transformations out of codegen and into CanonicalManager (CM). This first commit adds the design + phased execution plan (
docs/design/defect-handling-migration.md); future codegen-side changes for this effort will land here.What this is
patchesAPI in CM (one mechanism;preprocessPackagebecomes a deprecated alias for a single patch).packageIndexmode (use/recover/regenerate) replacing theignorePackageIndexboolean.excludeCanonical) replacing the internalskip-hack.ts.manager.report()) surfaced in codegen'sprettyReportso we can answer "why is type X missing/changed".Phasing
packageIndexmode, patch/report/entrytypes, the live patch + exclusion runtime, and CM docs.patchesruntime, one helper per commit, migrating each example.skip-hackto CM-level exclusion (the risky step); optional helper-factory relocation into CM.Scope note
Only raw-FHIR/package-level defect handling moves to CM. TypeSchema-level mechanisms (binding/enum drops,
missing_valuesets,treeShake/promoteLogical/resolveCollisions) stay in codegen. CM owns exclusion enforcement; codegen keeps the exclude list as data (to gate the field-level drop and to allow disable/override).