Skip to content

fix(*): add v3 model compatibility support and disable adding, creating and updating unversioned models - #1199

Merged
jamieshorten merged 6 commits into
accordproject:mainfrom
muhabdulkadir:main
Apr 29, 2026
Merged

jamieshorten merged 6 commits into
accordproject:mainfrom
muhabdulkadir:main

Conversation

@muhabdulkadir

@muhabdulkadir muhabdulkadir commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #

Concerto v4 currently rejects models that declare a concerto version range targeting v3, even when those models are otherwise valid and semantically compatible with the v4 runtime. As a result, existing v3 models fail at load time and cannot be reused in v4 environments.

This change restores practical backward compatibility for v3-authored models while keeping strict validation for unsupported versions.

Screenshots or Video

Related Issues

  • Issue #
  • Pull Request #

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Concerto v4 model loading to be more permissive about the concerto version pragma, allowing models that target an older major version to load under newer runtimes (to preserve compatibility with the existing v3 model ecosystem).

Changes:

  • Extends ModelFile#isCompatibleVersion() to accept a model’s declared version range when its minimum version targets an older major than the current runtime.
  • Adds clarifying JSDoc describing the new backward-compatibility behavior.

@mttrbrts mttrbrts left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should be stronger here @muhabdulkadir, we should specifically allow v3 versions to run with the v4 runtime, but nothing else. e.g. v0.82 is not compatible with v3

Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
modelManager = new ModelManager();
modelManager.addCTOModel('namespace test', 'test.cto');
}).should.throw(/Cannot add an unversioned namespace/);
}).should.throw(/Cannot create a ModelFile with an unversioned namespace/);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When addCTOModel() is called, it internally calls addModelFile(), which parses the CTO by calling ModelFile.fromAst(). Since I added the strict validation at the ModelFile.fromAst() level (to enforce it at all entry points, not just ModelManager), the error is now thrown there first.

@muhabdulkadir muhabdulkadir changed the title main fix(*): add v3 model compatibility support and disable adding, creating and updating unversioned models Apr 29, 2026
Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
@jamieshorten
jamieshorten merged commit 3aa33d7 into accordproject:main Apr 29, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants