Warn and suppress when author adds a duplicate invariant
- Dominant language
- TypeScript
- Stars
- 188
- Forks
- 64
- Avg merge
- 8d 11h
- Merged PRs (30d)
- 3
Description
If an author adds an invariant that is an exact match to an existing invariant (including `key` but excluding `source`), log a warning and skip adding the invariant (since duplicate invariants do not provide any value). If the key matches an existing invariant and the new invariant is a *superset* (e.g., it adds fields the other did not have), consider merging it with the existing invariant (but we need to investigate first to ensure the IG publisher supports this). If the key matches and existing invariant but has _different_ values than existing values, log an error and skip adding the invariant.
See: https://chat.fhir.org/#narrow/stream/215610-shorthand/topic/Auto-filter.20duplicate.20invariants.3F/near/395935276
Contributor guide
Research direction
Start by locating the TypeScript code path that adds author-defined invariants and the tests covering invariant handling. Compare exact matches and conflicting values, then investigate whether the FHIR IG Publisher supports merging keyed supersets. Done means duplicates are warned about and skipped, conflicting values are errors and skipped, and any supported merge behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100