chore: rename Example maturity level to Template - #2661
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The rename breaks existing Example consumers, documentation lists an invalid value, and compatibility guidance and regression coverage are needed.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Renames the model maturity level from Example to Template in the service API and documentation.
Changes:
- Renames the public enum constant.
- Updates the documented maturity-level values.
File summaries
| File | Change |
|---|---|
service/definition/src/main/java/ai/timefold/solver/service/definition/api/ModelMaturityLevel.java |
Renames the maturity-level enum constant. |
docs/src/modules/ROOT/pages/deploying-to-platform/model-metadata.adoc |
Documents Template as the maturity level. |
Review details
Suppressed comments (3)
docs/src/modules/ROOT/pages/deploying-to-platform/model-metadata.adoc:33
- Changing the documented value without a migration note leaves existing users unaware that
timefold.model.maturity-level=Examplenow causesvalueOfto throw during the build; add an upgrade entry telling users to replaceExamplewithTemplate, or preserve the legacy value.
Use `timefold.model.maturity-level` to tell consumers how stable a given model is, using the same https://docs.timefold.ai/timefold-platform/latest/models/versioning-and-maturity[maturity levels] Timefold uses for its own models (`Template`, `Experimental`, `Preview`, `Stable`, `Deprecated`).
docs/src/modules/ROOT/pages/deploying-to-platform/model-metadata.adoc:33
Deprecatedis listed as a valid configuration value here, but the enum has noDeprecatedconstant and the processor parses the property withModelMaturityLevel.valueOf(...), so this documented value causes deployment to fail withIllegalArgumentException; either add that enum value or remove it from the documented list.
Use `timefold.model.maturity-level` to tell consumers how stable a given model is, using the same https://docs.timefold.ai/timefold-platform/latest/models/versioning-and-maturity[maturity levels] Timefold uses for its own models (`Template`, `Experimental`, `Preview`, `Stable`, `Deprecated`).
service/definition/src/main/java/ai/timefold/solver/service/definition/api/ModelMaturityLevel.java:5
- Related deployment tests deserialize generated
ModelDescriptorfiles but never assert the maturity level, so this rename has no regression coverage for theTemplatevalue or compatibility with existingExampledescriptors; add a focused test for the property and serialized descriptor.
Template,
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
1a7ebbf to
3c15a40
Compare
3c15a40 to
f08d476
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Add the Revapi suppression or compatibility-baseline update for the deliberate enum constant removal.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
f08d476 to
153e498
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Add the intentional enum removal to the Revapi allowed differences before merging.
Review details
Suppressed comments (1)
service/definition/src/main/java/ai/timefold/solver/service/definition/api/ModelMaturityLevel.java:5
- The service-definition module runs Revapi over
ai.timefold.solver.service.definition.api(service/definition/pom.xml:52-63 and src/build/revapi-filter.json:3-10), but this removal has no corresponding allowed difference, so the API check will report the removed enum constant and fail the build; add an explicit entry torevapi-differences.jsonor otherwise configure this intentional preview break before merging.
Template,
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
153e498 to
7b69433
Compare
Fixes https://github.com/TimefoldAI/timefold-platform/issues/5484.