Conversation
A catalogue member was invisible to calm diff. Adding or removing one reported no change at all, and hasChanges stayed false, so calm diff --exit-code passed. An unchanged member appeared in no bucket, so the Hub painted it with no diff status. The catalogue is a choice block, so it is read as one more declaration source and expandAlternatives flattens it into the existing partition. Members land in the buckets that already exist. No new buckets, no change to NodeChange or hasChanges. An items schema that declares a node directly is not read, matching validation and the pattern renderer. The allOf traversal was written for prefixItems only, so it becomes findField, which takes what the caller is after. Reporting a change in obligation is out of scope and filed as finos#3111. It reproduces on main with no items involved.
YoofiTT96
force-pushed
the
feat/2859-diff-items
branch
from
September 15, 2026 22:05
6ff3b2a to
0197752
Compare
28 tasks
markscott-ms
requested changes
Sep 17, 2026
Contributor
|
@YoofiTT96 previous PR is now merged. |
aamanrebello
approved these changes
Sep 20, 2026
This branch has not been deployed
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.
Description
A catalogue member was invisible to
calm diff. Adding or removing one reported no change at all, andhasChangesstayed false, socalm diff --exit-codepassed. An unchanged member appeared in no bucket, so CALM Hub painted it with no diff status.Part of #2859.
PR sequence
Five stacked PRs, each reviewable alone, in this order:
prefixItemsalternatives — the pre-existing gaps that had to be fixed firstitemsin pattern validationitemsin generationitemsin the pattern diagramitemsin the pattern differGitHub will not let a cross-fork PR target a branch in my fork, so all five sit on
mainand each diff carries the ones below it. The commit to review here is the last one.The decision worth knowing
A catalogue is a choice block, and
expandAlternativesalready flattens those, so the catalogue is read as one more declaration source and its members flow into the existing partition. They land in the buckets that already exist — added, removed, modified, same. No new buckets, no change toNodeChange, nothing forhasChanges, the CLI report or the Hub to learn.An
itemsschema that declares a node directly is not read, which matches validation (#3060) and the pattern renderer (#3110).Out of scope
The differ cannot tell a guaranteed node from one alternative among several, so moving a node between those sites reports as no change. Filed as #3111 — it reproduces on
mainwith noitemsinvolved, and a fix needs three levels of obligation rather than two.Type of Change
A pattern that uses no
itemsdiffs exactly as before.Affected Components
cli/)calm/)calm-ai/)calm-hub/)calm-hub-ui/)calm-server/)calm-widgets/)docs/)shared/)calm-plugins/vscode/)calm-models, which the template has no box for. It is the base of the build order, so the change is deliberately self-contained.Commit Message Format ✅
feat(calm-models): compare items catalogues in the pattern differNote: commitlint warns on the
calm-modelsscope, which is missing from itsscope-enumwhilecli/.releaserc.jsoncarries ten release rules for it. The warning is a gap in the lint config, not the commit.Testing
Eight new tests covering a member added, removed, changed and unchanged, a pattern gaining and losing a catalogue, the reduced instance, and an
itemsschema that declares a node directly being ignored.Mutation-tested: removing the catalogue source fails seven of the eight, and relaxing the choice filter fails the eighth.
calm-modelspasses 217 tests, every TypeScript workspace builds, and the full rootnpm testis green apart from the long-standingcalmguard-docspeer-dependency test, which resolves over the network and times out.Checklist